NOT()

Overview

Returns a negated boolean expression.

USAGE

NOT(value)

Argument Name

Description

value

The value to negate

DETAILS

NOT() is a function that evaluates the argument as a truth value and then negates the value.

This means that any argument that evaluates as logical true (a non-zero number) returns 0 (false) and any argument that evaluates as logical false (zero) returns 1 (true).

A string is evaluated as a number, which parses any leading numerical content out of the string. A string with no numerical content is parsed as a zero.

A NULL is returned if the argument is NULL.

The function call NOT(x) behaves in exactly the same manner as the operator expression !x.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT NOT(42), NOT(NULL);
+---------+-----------+
| NOT(42) | NOT(NULL) |
+---------+-----------+
|       0 |      NULL |
+---------+-----------+
SELECT NOT(PI() = 3);
+---------------+
| NOT(PI() = 3) |
+---------------+
|             1 |
+---------------+

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