|
FIGURE 1: CREATE TABLE Syntax Continued from SQL Tutorial The syntax for the CREATE TABLE statement in SQL. Anything enclosed in square brackets ([]) is optional, and anything enclosed in curly braces ( {} ) can be repeated any number of times. CREATE TABLE table ( column CHARACTER (length) [ constraint ] | CHARACTER VARYING (length) [ constraint ] | DATE [ constraint ] | TIME [ constraint ] | INTEGER [ constraint ] | SMALLINT [ constraint ] | DECIMAL (precision, decimal places) [ constraint ] | FLOAT (precision) [ constraint ] [{ , column CHAR (length) [ constraint ] | VARCHAR (length) [ constraint ] | DATE [ constraint ] | TIME [ constraint ] | INT [ constraint ] | SMALLINT [ constraint ] | DEC (precision, decimal places) [ constraint ] | FLOAT (precision) [ constraint ] }]) ; Next: SIDEBAR: What's in a Name? Published as PC Tech Feature in the 11/3/98 issue of PC Magazine. Elsewhere on ZDNet
|
|
TOP |
Copyright (c) 1998 Ziff-Davis Inc. |