Make a design sketch  Choose the columns that accept null values

Chapter 8: Creating Databases and Tables

Create the user-defined datatypes

The first two columns are for the personal (first) name and surname. They are defined as 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.





Copyright © 2005. Sybase Inc. All rights reserved. Choose the columns that accept null values

View this book as PDF