I want to enumerate all the user-defined types created in the SQL Server database with CREATE TYPE, and/or find out if they have already been defined.
With tables or stored procedures I would do something like this:
if exists (select * from dbo.sysobjects where name='foobar' and xtype='U')
drop table foobar
Still, I can't find the equivalent (or a suitable alternative) for user-defined types. I surely can not see them anywhere in sysobjects.
Can anyone help me out regarding this?