picoSQL - Language reference manual


CREATE TABLE


Syntax:

CREATE TABLE table-name
(column-name data-definition [PRIMARY KEY]
[, column-name data-definition [PRIMARY KEY]] ... )
[, PRIMARY KEY (column-name [ ,column-name]...) ]


Purpose:

Allows the creation of a database table.


See also:

DROP, CREATE INDEX


Description:


This statement create a new table on the database.

The PRIMARY KEY clause, specified after a column declaration, cause this column to become a unique index on the table. Differently from the SQL standard, this clause can be part of more than one columns, creating in such way a primary index composed from more than one columns.

The PRIMARY KEY clause, specified after the declaration of all the columns, allows to specify a primary index composed by more than one columns in any order.

It is not allowed to use both the formats.


Index Previous Next