TRUE is a reserved keyword and literal value defined by the SQL standard to denote the logical value "true." It is part of the BOOLEAN data type introduced in SQL:1999. When used in expressions, predicates that evaluate to TRUE pass filter conditions, execute branches in CASE statements, and satisfy CHECK constraints. Because SQL uses three-valued logic (TRUE, FALSE, UNKNOWN), comparisons involving NULL never evaluate to TRUE unless explicitly handled with IS [NOT] NULL or COALESCE.Most modern databases implement a native BOOLEAN type and honor the TRUE literal. Some engines (for example, MySQL prior to 8.0) map BOOLEAN to TINYINT(1) and treat TRUE as numeric 1. In those systems, TRUE still behaves as a synonym for 1 in Boolean contexts, but strict typing rules may differ.Using TRUE can simplify queries (e.g., toggling optional filters with a parameter that defaults to TRUE) and makes intent explicit when updating flags or writing CHECK constraints. However, relying on TRUE in dialects that alias it to integers can introduce portability issues if you later migrate to a database with strict Boolean enforcement.
SQL:1999
TRUE is the literal that represents logical truth. When a predicate evaluates to TRUE, the row passes the filter, branch, or constraint.
Yes in most modern engines. Earlier MySQL versions map TRUE to numeric 1, which is functionally similar but not a native Boolean.
In strict Boolean implementations (e.g., PostgreSQL), TRUE is a distinct Boolean value. In some engines, 1 can be cast to TRUE but should not be confused with the literal.
No. In SQL's three-valued logic, comparisons with NULL return UNKNOWN. Use IS NULL or COALESCE to convert NULLs before comparison.