STRICT table
A SQLite table declared with the STRICT keyword, which rejects any value that does not match its column's declared type.
In more detail
STRICT tables were added in SQLite 3.37 and make SQLite behave like a server database for types. Their columns must use one of the basic type names, such as INTEGER, REAL, TEXT or BLOB. Write STRICT when you want mistakes refused rather than stored.
Example
CREATE TABLE tight (n INTEGER) STRICT;Related terms
- type affinity — SQLite's rule that a column's declared type is only a preference: values are converted when sensible and otherwise stored as they are.
- data type — The kind of a value, such as a whole number, text or a date, which decides what you can do with it and how it compares and sorts.
- SQLite — A small relational database that runs as a library inside your program and keeps the whole database in one file.
Taught in
- Data Types And What To Choose — PostgreSQL, Indexing & Relational Data Modeling