SQL Operators (2024)

SQL Arithmetic Operators

OperatorDescriptionExample
+AddTry it
-SubtractTry it
*MultiplyTry it
/DivideTry it
%ModuloTry it

SQL Bitwise Operators

OperatorDescription
&Bitwise AND
|Bitwise OR
^Bitwise exclusive OR

SQL Comparison Operators

OperatorDescriptionExample
=Equal toTry it
>Greater thanTry it
<Less thanTry it
>=Greater than or equal toTry it
<=Less than or equal toTry it
<>Not equal toTry it

SQL Compound Operators

OperatorDescription
+=Add equals
-=Subtract equals
*=Multiply equals
/=Divide equals
%=Modulo equals
&=Bitwise AND equals
^-=Bitwise exclusive equals
|*=Bitwise OR equals

SQL Logical Operators

OperatorDescriptionExample
ALLTRUE if all of the subquery values meet the conditionTry it
ANDTRUE if all the conditions separated by AND is TRUETry it
ANYTRUE if any of the subquery values meet the conditionTry it
BETWEENTRUE if the operand is within the range of comparisonsTry it
EXISTSTRUE if the subquery returns one or more recordsTry it
INTRUE if the operand is equal to one of a list of expressionsTry it
LIKETRUE if the operand matches a patternTry it
NOTDisplays a record if the condition(s) is NOT TRUETry it
ORTRUE if any of the conditions separated by OR is TRUETry it
SOMETRUE if any of the subquery values meet the conditionTry it

SQL Operators (2024)
Top Articles
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 6454

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.