Resolving base datatypes from User Defined Datatypes. : systypes  « System Tables Views « SQL Server / T-SQL Tutorial






3>
4>
5>      SELECT    t1.name, t2.name
6>      FROM      systypes t1 JOIN systypes t2
7>                ON t1.type = t2.type
8>      WHERE     t1.usertype >= 100
9>      AND       t2.usertype < 100
10>     AND       t2.usertype NOT IN (18,80)
11> GO
name                                                                                                                             name

-------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------
---------------------------------------------------------
id                                                                                                                               sql_variant

id                                                                                                                               varchar

id                                                                                                                               nvarchar


(3 rows affected)
1>








27.34.systypes
27.34.1.Resolving base datatypes from User Defined Datatypes.