XOR

Overview

Logical Exclusive "or" operator.

USAGE

value1 XOR value2

Value Name

Description

value

A truth value expression

DETAILS

The XOR operator compares two truth values, returning 1 (true) if the two values have opposite values, otherwise 0.

A NULL is returned if either truth value expression is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT TRUE XOR TRUE, FALSE XOR FALSE;
+---------------+-----------------+
| TRUE XOR TRUE | FALSE XOR FALSE |
+---------------+-----------------+
|             0 |               0 |
+---------------+-----------------+
SELECT TRUE XOR FALSE, FALSE XOR TRUE;
+----------------+----------------+
| TRUE XOR FALSE | FALSE XOR TRUE |
+----------------+----------------+
|              1 |              1 |
+----------------+----------------+
SELECT 7 XOR 0, 0 XOR 2, 5 XOR 7;
+---------+---------+---------+
| 7 XOR 0 | 0 XOR 2 | 5 XOR 7 |
+---------+---------+---------+
|       1 |       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