IS NOT

USAGE

expression IS NOT TRUE|FALSE|UNKNOWN

Value Name

Description

expression

A value expression

DETAILS

The IS NOT operator returns a truth value for one of 3 negated boolean comparisons:

  • x IS NOT TRUE checks if the expression does not evaluate to TRUE (is not a non-zero value)

  • x IS NOT FALSE checks if the expression does not evaluate to FALSE (is not a zero value)

  • x IS NOT UNKNOWN checks if the expression has a known value (is not NULL)

The return value is always 1 (true) or 0 (false). Evaluating a NULL value does not return NULL because this operator considers it to be UNKNOWN and never TRUE or FALSE.

See IS for the positive version of these comparisons.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT 1 IS NOT TRUE, 1 IS NOT FALSE, 1 IS NOT UNKNOWN;
+---------------+----------------+------------------+
| 1 IS NOT TRUE | 1 IS NOT FALSE | 1 IS NOT UNKNOWN |
+---------------+----------------+------------------+
|             0 |              1 |                1 |
+---------------+----------------+------------------+
SELECT 0 IS NOT TRUE, 0 IS NOT FALSE, 0 IS NOT UNKNOWN;
+---------------+----------------+------------------+
| 0 IS NOT TRUE | 0 IS NOT FALSE | 0 IS NOT UNKNOWN |
+---------------+----------------+------------------+
|             1 |              0 |                1 |
+---------------+----------------+------------------+
SELECT NULL IS NOT TRUE, NULL IS NOT FALSE, NULL IS NOT UNKNOWN;
+------------------+-------------------+---------------------+
| NULL IS NOT TRUE | NULL IS NOT FALSE | NULL IS NOT UNKNOWN |
+------------------+-------------------+---------------------+
|                1 |                 1 |                   0 |
+------------------+-------------------+---------------------+
SELECT 42 != TRUE, 42 IS NOT TRUE;
+------------+----------------+
| 42 != TRUE | 42 IS NOT TRUE |
+------------+----------------+
|          1 |              0 |
+------------+----------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES