Reputation: 89
This resource documents outcomes from implicit data conversion for MS SQL Server. Unfortunately, this list omits the Numeric data type. Can someone confirm that the Numeric type falls in line with the closely related Decimal type? My immediate need is to confirm that Numeric slots above the Money data type. Thanks.
Upvotes: 0
Views: 76
Reputation: 4810
Similar to decimal, numeric does have a higher data precendence than money. The following returns numeric as the result.
DECLARE @num NUMERIC
DECLARE @money MONEY
SET @num = 99.99
SET @money = 99.99
SELECT SQL_VARIANT_PROPERTY(@num + @money,'BaseType') as DataType
Upvotes: 2
Reputation: 13641
From the docs:
Decimal and numeric are synonyms and can be used interchangeably.
They are not merely closely related, they are the same thing from SQL Server's perspective and thus have the same conversion precedence.
Upvotes: 2