:: Intro :: Datatypes :: DDL :: DML :: Operators :: Built-ins ::
All the following operators are used as part of expressions (typically
in a WHERE clause)
Operator DESCRIPTION
+ addition
- subtraction
/ division
* multiplication
= equal/identical to
!= not equal to
<> not equal to
> greater/later than
>= greater or equal to
< less/earlier than
<= less or equal
AND conjunction
OR disjunction
NOT negation
EXISTS at least one value present
IS NULL has null value (use NULL)
BETWEEN..AND.. start..finish boundary conditions
LIKE pattern matching using '%' or '_' wildcards
PART find letters in a string (eg. ARTIST PART 'QZ'
meaning the artist column contains a 'Q' or a 'Z')
() represents a solution set (eg. a select or a list)
IN () is a member of
NOT IN () isn't a member of
ANY() means some member
= ANY () equals some member [use IN()]
^= ANY () not equal to some member
> ANY () greater/later than some member
>= ANY () greater or equal to some member
< ANY () less/earlier than some member
<= ANY () less or equal to some member
ALL() means every member
= ALL () equals every member
^= ALL () not equal to every member [use NOT IN()]
> ALL () greater/later than every member
>= ALL () greater or equal to every member
< ALL () less/earlier than every member
<= ALL () less or equal to every member
A full list of built-ins can be seen in the MySQL manual
:: Intro :: Datatypes :: DDL :: DML :: Operators :: Built-ins ::