Creating the user-defined datatypes

The first two columns are for the personal (first) name and surname. They are defined as the nm datatype. Before you create the table, create the datatype. The same is true of the p# datatype for the phone column:

execute sp_addtype nm, "varchar(30)" 
execute sp_addtype p#, "char(10)" 

The nm datatype allows for a variable-length character entry with a maximum of 30 bytes. The p# datatype allows for a char datatype with a fixed-length size of 10 bytes.