Imp SQL Operators


There are following operators in SQL Server which mainly we used in our where clause:

Comparison Operator: As the name suggests Comparison, it compares the column data with specified values in a condition.


Operator
Description
=
Equal to
<> or !=
Not Equal to
< 
Less than
> 
Greater than
>=
Greater than or equal to
<=
Less than or equal to

Logical Operators: These operators compare two conditions simultaneously. Here are these operators and descriptions:

Operator
Description
AND
All the specified conditions must be true
OR
At least one condition must be true
Not
Condition must be false

Mathematical Operators: These operators are used to mathematics. Here are few examples:

Operator
Description
+
For Additions
-
For Subtractions
*
For Multiplications
/
For Divisions
%
For Modulus (reminder) value


I hope this is very much differentiation of SQL operators, many of beginners confused which operator to use and where to use.   

Comments