Win a PalmPilot or a $3000 shopping Spree!

PC Magazine

  PC Tech

SQL: The Universal Database Language

Introduction

What is SQL?

What is a Relational Database System?

Relational Model Basics

SQL and the Relational Model

Static and Dynamic SQL

SQL Tutorial

FIGURE 1: CREATE TABLE Syntax

SIDEBAR: What's in a Name?



X10.com - The SuperSite for Home Automation!

NextCard Internet Visa - Apply Now

 
  Category
Software

Related Stories
Handling Data with SQL
-- 11/17/98

Next: SIDEBAR: What's in a Name?

SQL: The Universal Database Language
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
Learn SQL Online -- ZD University
Business Software: Databases -- ZD Products

 
 SPONSORED LINKS
@Backup   Your Solid Online Backup Plan. Download Now.
Services   9c/MINUTE LONG DISTANCE, 5c/MINUTE ON SUNDAYS!
STORAGE   Quantum means non-stop business, 24 hours a day
Software   X10.com -- The SuperSite for Home Automation
Books   Bargain Books up to 90% off at barnesandnoble.com
 ZDNET FEATURED LINKS
Downloads   Check out the best new downloads in Reviewer's Raves
Bargains!   Shop the Basement for best buys on computer products
Free Help   Got computing questions? ZDHelp has all the answers!
 MAGAZINE OFFERS
Free Offer   Get a FREE SUBSCRIPTION to Inter@ctive Week

TOP
Copyright (c) 1998 Ziff-Davis Inc.