IS
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Operators for MariaDB Enterprise Server
Topics on this page:
Overview
Boolean comparison.
EXAMPLES
SELECT 1 IS TRUE, 1 IS FALSE, 1 IS UNKNOWN;
+-----------+------------+--------------+
| 1 IS TRUE | 1 IS FALSE | 1 IS UNKNOWN |
+-----------+------------+--------------+
| 1 | 0 | 0 |
+-----------+------------+--------------+
SELECT 0 IS TRUE, 0 IS FALSE, 0 IS UNKNOWN;
+-----------+------------+--------------+
| 0 IS TRUE | 0 IS FALSE | 0 IS UNKNOWN |
+-----------+------------+--------------+
| 0 | 1 | 0 |
+-----------+------------+--------------+
SELECT NULL IS TRUE, NULL IS FALSE, NULL IS UNKNOWN;
+--------------+---------------+-----------------+
| NULL IS TRUE | NULL IS FALSE | NULL IS UNKNOWN |
+--------------+---------------+-----------------+
| 0 | 0 | 1 |
+--------------+---------------+-----------------+
SELECT 42 = TRUE, 42 IS TRUE;
+-----------+------------+
| 42 = TRUE | 42 IS TRUE |
+-----------+------------+
| 0 | 1 |
+-----------+------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.