Operators Overview

Arithmetic Operators

NameDescription
%,MODModulo operator
*Multiplication operator
+Addition operator
-Minus operator
-Change the sign of the argument
/Division operator
DIVInteger division

Assignment Operators

NameDescription
=Equal operator

Bit Functions and Operators

NameDescription
&Bitwise AND
>>Right shift
<<Left shift
^Bitwise XOR
~Bitwise inversion

Cast Functions and Operators

NameDescription
CAST()Cast a value as a certain type
CONVERT()Cast a value as a certain type

Comparison Functions and Operators

NameDescription
>Greater than operator
>=Greater than or equal operator
<Less than operator
<>,!=Not equal operator
<=Less than or equal operator
=Equal operator
BETWEEN … AND …Whether a value is within a range of values
IN()Whether a value is within a set of values
ISTest a value against a boolean
IS NOTTest a value against a boolean
IS NOT NULLNOT NULL value test
IS NULLNULL value test
LIKESimple pattern matching
NOT BETWEEN … AND …Whether a value is not within a range of values
NOT LIKENegation of simple pattern matching
COALESCEReturn the first non-null value in a list

Flow Control Functions

NameDescription
CASECase operator
IF()If/else construct

Logical Operators

NameDescription
AND,&&Logical AND
NOT,!Negates value
ORLogical OR
XORLogical XOR