Choose the columns that accept null values  Creating new tables from query results: select into

Chapter 8: Creating Databases and Tables

Define the table

Write the create table statement:

create table friends_etc 
(pname       nm             not null, 
sname        nm             not null, 
address      varchar(30)    null, 
city         varchar(30)    not null, 
state        char(2)        not null, 
postalcode   char(5)        null, 
phone        p#             null, 
age          tinyint        null, 
bday         datetime       not null, 
gender       bit            not null, 
debt         money          not null, 
notes        varchar(255)   null) 

You have now defined columns for the personal name and surname, address, city, state, postal code, telephone number, age, birthday, gender, debt information, and notes. Later, you will create the rules, defaults, indexes, triggers, and views for this table.





Copyright © 2005. Sybase Inc. All rights reserved. Creating new tables from query results: select into

View this book as PDF