Operators In SQL:
Operator symbols are used to perform operation on the basis of operands. In SQL all operators are based into their classification types:
- Arithmatical operators
- Comparison operators
- Logical Operator
- Miscellaneous Operators
Arithmatical operation:
Description |
Operators |
Work |
Addition |
+ |
a+b=c |
Subtraction |
- |
a-b=c |
Multiplication |
* |
a*b=c |
Division |
/ |
a/b=c |
Remainder(modulas) |
% |
a%b=c |
Comparison operators:
Description |
Operators |
Work |
Greater than symbol used to analysis the greater value. |
> |
a>b(here a is greater than b) |
Less than symbol used to operand the less than value |
< |
a< b (here a is less than b) |
Greater than equals to compare the value either it is greater than or equals too |
=> |
a=>b (here a is either greater than or equals to b) |
Less than equals to compare the value either it is less than or equals too |
<= |
a=<b (here a is either greater than or equals to b) |
Equals to compare both operands on right side and left side. |
= |
a=b (here both operands euals to each other) |
It check the left value operands are not equal to right operands. |
! |
a!=b (here both operands equals to each other) |
Logical Operator:
Description |
Operators |
AND Operator combines two or more than two condition together.
If both condition is true then the result became return to true. |
AND |
This Operator reverse the meaning of any logical operator. |
Not |
OR Operator combines two or more than condition together.
In this condition only one condition is true and other is false. |
OR |
It Search the value with in the set of values where it is maximum and minimum |
BETWEEN |
It searches the specified table for UNIQUENESS |
UNIQUE |
Miscellaneous Operator:
Not in |
like |
Exists |
In null |
Is not null |
Any |
not between |
ALL |
IN |
Union all |
Union |
Intersect |
minus |
some |
|