Steve Jones - SSC Editor
SSC Guru
Points: 738337
More actions
November 18, 2022 at 12:00 am
#4106967
Comments posted to this topic are about the item The SQL Variant Types
Carlo Romagnano
SSC-Insane
Points: 22771
November 18, 2022 at 8:00 am
#4114711
Good catch!
It is Interesting that NULL never has a BaseType, also if you cast it to a defined type (e.g. INT).
SELECT *,LEN(V.a),dataLENgth(V.a),SQL_VARIANT_PROPERTY(V.a, 'BaseType') FROM (VALUES (N'1'),('2'),('3'),(NULL)) AS V([a])
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy