How to identify User Defined Table(UDT) Type Information in SQL Server

Here is a script to identify the User Defined Table Type information.

The script will list down the information like column name, type name and Schema name.


SELECT 
	TT.NAME TABLE_NAME, C.NAME COLUMN_NAME 
        ,TYPE_NAME(TT.SYSTEM_TYPE_ID) [TYPE_NAME]
	,SCHEMA_NAME(SCHEMA_ID) [SCHEMA_NAME]
FROM SYS.TABLE_TYPES TT
INNER JOIN SYS.COLUMNS C ON C.OBJECT_ID = TT.TYPE_TABLE_OBJECT_ID
ORDER BY TT.NAME
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s