CREATE TABLE author (
author_id int primary key not null auto_increment,
author_name char(50),
author_address char(100),
author_dob date,
author_ssn int )
CREATE TABLE table_name (create_definition)
| Type | Description |
|---|---|
| char(width) | Fixed-width string |
| int[(bytes)] | Integer, defaults to 4 bytes |
| float[(bytes)] double[(bytes)] |
Floating-point number, defaults to 8 bytes |
| date | A date string (format is vendor-specific) |
| time | A time string (format is vendor-specific) |
| blob | A binary string (maximum length is vendor-specific) |
| Type | Description |
|---|---|
| [NOT] NULL | Whether the column can be NULL or not |
| PRIMARY KEY | Whether the column is the primary key for this table |
| DEFAULT default_value | The default value for the column, if not specified in an INSERT statement |
| AUTO_INCREMENT | Whether a new unique value should be generated upon each INSERT statement |
title_id int not null auto_increment primary key
name char(80) not null
Is the CREATE TABLE statement the same in every database implementation?
|
Dan Keller Technical Services 4500 19th St., San Francisco California, USA 94114 tel: 415 / 861-4500 |