The syntax of create table is in the Reference Manual.
For a complete discussion of the syntax, see create table in the Reference Manual.
The create table statement:
Defines each column in the table.
Provides the column name and datatype and specifies how each column handles null values.
Specifies which column, if any, has the IDENTITY property.
Defines column-level integrity constraints and table-level integrity constraints. Each table definition can have multiple constraints per column and per table.
For example, the create table statement for the titles table in the pubs2 database is:
create table titles (title_id tid, title varchar(80) not null, type char(12), pub_id char(4) null, price money null, advance money null, royalty int null, total_sales int null, notes varchar(200) null, pubdate datetime, contract bit not null)
The following sections describe components of table definition: system-supplied datatypes, user-defined datatypes, null types, and IDENTITY columns.
The on segment_name extension to create table allows you to place your table on an existing segment. segment_name points to a specific database device or a collection of database devices. Before creating a table on a segment, see a System Administrator or the Database Owner for a list of segments that you can use. Certain segments may be allocated to specific tables or indexes for performance reasons, or for other considerations.
Copyright © 2005. Sybase Inc. All rights reserved. |