kör detta
declare @d int
select @d = 500
if cast(sql_variant_property(@d,'BaseType') as varchar(20)) = 'int'
print 'yes'
else
print 'no'
kör detta
declare @d int
select @d = 500
if cast(sql_variant_property(@d,'BaseType') as varchar(20)) = 'int'
print 'yes'
else
print 'no'