cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the base primitive data type of a UDT

Former Member
0 Kudos
3,599

I know I can use sp_help <datatypename> to get information on a UDT. However is there a way for me to get the base primitive data type through SQL. Querying systypes doesn't seem to give me anything unique to get the primitive type that was used during creation.

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor
0 Kudos

What version are you using?

v12 has introduced the "base_type_str" field in the "SYSUSERTYPE" system view:

select type_name, base_type_str, * from sysusertype

For older versions, you might need to build such a value based on joining SYSUSERTYPE with SYSDOMAIN.