August 2010
Intermediate to advanced
526 pages
23h 39m
English
CREATE TABLE — Define and create a new table







CREATE TABLEdatabase_name.table_name(c1_name c1_type,c2_name c2_type...); CREATE TABLEdatabase_name.table_nameAS SELECT * FROM... ; CREATE TABLE tbl ( a, b, c ); CREATE TABLE people ( people_id INTEGER PRIMARY KEY, name TEXT ); CREATE TABLE employee ( employee_id INTEGER PRIMARY KEY NOT NULL, name TEXT NOT NULL, start_date TEXT NOT NULL DEFAULT CURRENT_DATE, parking_spot INTEGER UNIQUE );
The CREATE
TABLE command is used to define a new table. It
is one of the most complex SQL commands understood by SQLite,
though nearly all of the syntax is optional.
A new table can be created in a specific database by qualifying the table ...