User-defined data types are based on the system data types in Microsoft® SQL Server™. User-defined data types can be used when several tables must store the same type of data in a column and you must ensure that these columns have exactly the same data type, length, and nullability. For example, a user-defined data type called postal_code could be created based on the char data type.
When a user-defined data type is created, you must supply these three parameters:
When nullability is not explicitly defined, it will be assigned based on the ANSI null default setting for the database or connection.
Note If a user-defined data type is created in the model database, it exists in all new user-defined databases. However, if the data type is created in a user-defined database, the data type exists only in that user-defined database.
To create user-defined data types
To delete user-defined data types
ALTER TABLE | Using Data Types |
CREATE TABLE |