Saturday, July 30, 2005

User Defined Datatypes

To list all the User Defined Datatypes in a given database:

SELECT
[name] UDT,
type_name(xtype) Type,
Length,
xprec [Precision],
xscale Scale,
CASE WHEN AllowNulls = 1 THEN 'Yes' ELSE 'No' END [ISNULL]
FROM systypes
WHERE xusertype > 256
ORDER BY [name]

0 Comments:

Post a Comment

<< Home