SQL operators

 

SQL has three types of operators, namely arithmetic operators, logical operators and comparison operators.

Arithmetic Operators

Operatoruseusageresult
+addition1 + 23
-Subtraction5-41
*multiplication6 * 636
/quotient8/51.6
%remainder8% 53

Logical Operators

OperatorSemantics
ANDAnd
ORor
NOTnon-

Comparison Operators (Comparison Operators)

OperatorSemanticsusageresult
<Less than3 <5True
>more than the8> 1True
<=Less than or equal to20 <= 10False
>=greater or equal to4 >= 6False
=equal2 = 2True
<>not equal to7 <> 6True
BETWEENWithin a certain range  
LIKEMeet the model conditions  
INThe value exists in the IN collection  

Post a Comment

0 Comments