Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Check User_Defined Type

Author  Topic 

aprichard
Yak Posting Veteran

62 Posts

Posted - 2009-01-03 : 02:08:59
How to check whether User_Defined Type is exist or not in database

Thanks in Advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-03 : 06:56:04
[code]
IF EXISTS (SELECT 1 FROM systypes WHERE name='your user defined data type name')
PRINT 'UDT Exists'
ELSE
PRINT 'Not Exists'
[/code]
if sql 2005 or later use sys.types
Go to Top of Page
   

- Advertisement -