Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Choose the columns that accept null values [Table of Contents] Creating new tables from query results: select into

Transact-SQL User's Guide

[-] Chapter 7 Creating Databases and Tables
[-] How to design and create a table
[-] Define the table

Define the table

Now, 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.


Choose the columns that accept null values [Table of Contents] Creating new tables from query results: select into