CREATE TABLE
Try it yourself →Creates a new table.
Syntax
CREATE TABLE name (column type, ...);
Description
Defines a table with column names and types. Common types: INTEGER, TEXT, REAL. PRIMARY KEY is the primary key.
Example
CREATE TABLE item (id INTEGER PRIMARY KEY, name TEXT, price REAL); INSERT INTO item VALUES (1, 'Pen', 5.5); SELECT name, price FROM item;
Expected output
Pen|5.5
When to use?
Setting up the database schema.