Categories
Sql Server

How to create user defined data type in Sql server

Data Type:-

Objects that contain data have an associated data type that defines the kind of data the object can contain.

Alias Data type:-

Alias types based on the system data types in SQL Server. Alias types are used when several tables must store the same type of data in a column and you have to make sure that these columns have identical data type, length, and nullability.Alias types are not supported in table variables.

Query:-

CREATE TYPE Description FROM nvarchar(50) NOT NULL ;