Are there User Defined Data Types in SQL Server? How can we create and use them?
Creating UTD:
Method#1:
CREATE TYPE PhoneNr FROM VARCHAR(13) DROP TYPE PhoneNr
Method#2:
sp_addType PhoneNr, 'VARCHAR(13)' sp_droptype PhoneNr
Usage
CREATE TABLE PersonalInfo ( PersonID INT, PersonNm VARCHAR(100), Phone PhoneNr)