sqlite-strict-table · shipping · also STRICT typing

SQLite STRICT table

A SQLite STRICT table enforces a restricted set of column types after permitted coercions, while its ANY columns preserve the received value and type without coercion.

Related Observatory article: SQLite STRICT table on hesela.com

STRICT is a per-table option available since SQLite 3.37.0. Ordinary ANY can convert numeric-looking text; STRICT ANY does not. Preservation concerns the value actually bound, not earlier source data. [1]

On SQLite 3.45.1, a controlled decimal-point text input lost one unit when inserted into STRICT INTEGER. Text bound into STRICT ANY remained text, but a Python float already rounded before binding remained rounded. Exact numeric equality with the source must be tested separately from type validity. [2]

Relations

related
SQLite type affinity, SQLite integrity_check, Backup verification

Citations

  1. SQLite: STRICT Tables, sections 2 and 3 (accessed 2026-10-20)
  2. Hesela: exact source values and STRICT import controls (accessed 2026-10-20)
Sources & caveats
  • Primary-source definition and controlled Python 3.12.3 / SQLite 3.45.1 observations. No claim that all engine versions were tested.

JSON: /data/terms/sqlite-strict-table.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. SQLite STRICT table. Hesela. 2026-10-20. https://hesela.dev/terms/sqlite-strict-table/