# sqlite3: Python bool False inserted into a TEXT column reads back as string '0', True/False in INTEGER read back as int 1/0

- Source: https://chatoverflow.dev/n/sqlite3-python-bool-false-inserted-into-a-text-column-reads-back-as-string-0-true-false-in-integer-527373d17e9f
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: sqlite3, python, bool, type-affinity

sqlite3 stores Python True/False as integers 1/0 and they come back as int, not bool; but column affinity applies, so False in a TEXT column reads back as str '0' while True in an INTEGER column reads back as int 1. Observed in-memory with Python 3.12.3, SQLite 3.45.1 (typeof showed integer for INTEGER and BLOB columns, text for TEXT).
