A native data type representing a true/false value, stored and queried without numeric or string proxies.
Stores true/false values. Some databases store as integer (0/1) internally. NULL represents unknown, distinct from FALSE. Boolean columns are more self-documenting than integer or string representations and enable proper three-valued logic.
| Database System | Support Status | Since Version | Notes |
|---|---|---|---|
| MySQL | ✓ Supported | 5.0 | BOOLEAN and BOOL are aliases for TINYINT(1). Values are stored as 0/1; TRUE and FALSE are just aliases for 1 and 0. Comparisons like WHERE is_active = TRUE work but WHERE is_active IS TRUE does not. |
| PostgreSQL | ✓ Supported | 7.4 | True native BOOLEAN type. Accepts 'true', 'false', 't', 'f', 'yes', 'no', '1', '0' as input literals. IS TRUE / IS FALSE predicates work correctly and handle NULLs distinctly. |
| SQL Server | ✗ Not Supported | — | No BOOLEAN or BOOL type. Use BIT (0, 1, or NULL). BIT columns cannot be used directly in WHERE without comparison: WHERE is_active = 1, not WHERE is_active. |
| Oracle | ✓ Supported | 23c | Native BOOLEAN column type added in Oracle 23c. In earlier versions, use NUMBER(1) with a CHECK(col IN (0,1)) or CHAR(1) with CHECK(col IN ('Y','N')). PL/SQL has always had a BOOLEAN type but it was not usable in SQL or as a column type prior to 23c. |
| SQLite | ✓ Supported | 3.0.0 | SQLite has no separate BOOLEAN storage class — values are stored as integers 0 and 1. The keywords TRUE and FALSE are recognized as integer literals 1 and 0 since SQLite 3.23.0. |
Only PostgreSQL has a true, fully-featured BOOLEAN type. MySQL's BOOLEAN is transparently TINYINT(1), which means any integer value can be inserted, not just 0 and 1, and IS TRUE / IS FALSE predicates behave differently than in PostgreSQL. SQL Server's BIT is the closest equivalent but cannot be used as a standalone expression in WHERE — it always requires an explicit comparison operator. Oracle only gained a SQL-level BOOLEAN column type in 23c; before that, PL/SQL had BOOLEAN but it was unusable in DDL or plain SQL queries, forcing teams to use numeric or character proxies. When writing cross-engine code, the safest portable pattern is a SMALLINT or TINYINT column constrained to 0 and 1 with a CHECK constraint, compared with = 1 / = 0.
BOOLEAN and BOOL are aliases for TINYINT(1). Values are stored as 0/1; TRUE and FALSE are just aliases for 1 and 0. Comparisons like WHERE is_active = TRUE work but WHERE is_active IS TRUE does not.
True native BOOLEAN type. Accepts 'true', 'false', 't', 'f', 'yes', 'no', '1', '0' as input literals. IS TRUE / IS FALSE predicates work correctly and handle NULLs distinctly.
No BOOLEAN or BOOL type. Use BIT (0, 1, or NULL). BIT columns cannot be used directly in WHERE without comparison: WHERE is_active = 1, not WHERE is_active.
Native BOOLEAN column type added in Oracle 23c. In earlier versions, use NUMBER(1) with a CHECK(col IN (0,1)) or CHAR(1) with CHECK(col IN ('Y','N')). PL/SQL has always had a BOOLEAN type but it was not usable in SQL or as a column type prior to 23c.
SQLite has no separate BOOLEAN storage class — values are stored as integers 0 and 1. The keywords TRUE and FALSE are recognized as integer literals 1 and 0 since SQLite 3.23.0.