Steve Jones - SSC Editor
SSC Guru
Points: 736212
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: 22669
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 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply