There are three ways. Via TSQL you can use the stored procedure 'sp_addtype'. SQL-DMO has a 'UserDefinedDatatype' object as a member of a database's 'UserDefinedDatatypes' collection. Add the object to this collection creates the user defined type.
Probably the simplest way is to use Enterprise Manager. Expand the database to add the type, right click 'User defined types' amd select 'New User defined type'.
You cannot define a user defined type as having the identity property, as this is a property of a
column in a table, and not a property of a datatype itself.
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com