CREATE TABLE defines a new relational table. It gives the table a name, lists its columns, assigns data types, and adds rules such as NOT NULL and PRIMARY KEY. section 1.10
CREATE TABLE table_name ( column1_name datatype [optional_parameters], column2_name datatype [optional_parameters], ... columnN_name datatype [optional_parameters], PRIMARY KEY (columnX_name) );
Use this general pattern as a checklist: name the table, define each column, add optional parameters, and declare the primary key. section 1.10
A product table
A product table can contain product_id as INT, name and description as TEXT, price as DECIMAL(5, 2), and manufacturer as TEXT. PRIMARY KEY identifies the key column, while NOT NULL requires values for the other columns. section 1.10
When running a CREATE TABLE command:
- Run it once for a given table name; running it again can produce a duplicate-table complaint. section 1.10
- If a prepared script already created the table, reset the SQLite Online workspace or delete the existing table before retrying. section 1.10
- Treat CREATE TABLE as table-management DDL, alongside ALTER TABLE and DROP TABLE. section 1.12





