The skeleton statement
Every SQLite database is a collection of tables, and every table is created with CREATE TABLE. The shape is straightforward:
CREATE TABLE table_name (
column_name TYPE [constraints],
...
);What this gives you in SQLite is a real schema, but with one twist: SQLite uses type affinity rather than strict typing by default. The TYPE hint matters, but the engine will accept values of any type unless you explicitly opt in to STRICT mode (next lessons). For now, follow the convention — declare the type you mean and treat it as a contract you and your code keep.
Five core type names you'll use 95% of the time:
INTEGER— whole numbers, up to 8 bytes signed.REAL— IEEE 754 doubles.TEXT— UTF-8 strings.BLOB— raw bytes.NUMERIC— affinity that prefers integers but accepts decimals; rarely worth the ambiguity.
Principle: Even though SQLite is dynamically typed by default, write your
CREATE TABLEs as if they were strict. Future you, future Pippa, future readers will thank you. Document intent in the schema, not in the code that uses it.