SQL Operators for MariaDB Xpand 6.0

Overview

Structured Query Language (SQL) operators are keywords and symbols used to perform common arithmetic, logical, and matching operations on columns and column data.

Operator

Description

!

See NOT

!=

Negated equality with special treatment for NULL

%

See MOD

&

Bitwise "and"

&&

See AND

*

Multiplication

+

Addition

-

Subtraction

->

Extract a value from JSON data using a path expression. A string result is returned with its double quotes intact.

->>

Extract a value from JSON data using a path expression. A string result is returned unquoted.

/

Floating point division

::

Extract a value from JSON data using an abbreviated path expression. A string result is returned unquoted.

:=

Assign value

<

Less than

<<

Bitwise left shift

<=

Less than or equal to

<=>

Equality without special treatment for NULL

<>

See "!="

=

Equality with special treatment of NULL

>

Greater than

>=

Greater than or equal to

>>

Bitwise right shift

^

Bitwise exclusive "or"

|

Bitwise "or"

||

See OR

~

Bitwise negation

AND

Logical "and"

ANY

Presence in any returned rows

BETWEEN

Inclusion in a range

BINARY

Casts strings to binary values

DIV

Integer division

EXISTS

Presence of returned rows

IN

Presence of value in a list

IS

Boolean comparison

IS NOT

Negated boolean comparison

LIKE

Pattern matching

MOD

Modulo

NOT

Logical negation

NOT BETWEEN

Negated inclusion in a range

NOT IN

Not present in a list

NOT LIKE

Negated pattern matching

NOT REGEXP

Negated Regular Expression matching

NOT RLIKE

See NOT REGEXP

OR

Logical "or"

REGEXP

Regular Expression matching

RLIKE

See REGEXP

SOME

See ANY

SOUNDS LIKE

Soundex matching

XOR

Logical Exclusive "or" operator