SQL Operators:
SQL Operators are used to perform certain operations in SQL. Below are different type of the SQL Operators.
1. Arithmetic Operators.
2.Relational Operators OR Comparison Operators.
3.Logical Operators.
4.Special Operators.
1. Arithmetic Operators:
Arithmetic operators are used to perform the arithmetic operations like Add, Substract.
operator Description
+ ADD
- SUBTRACT
/ DIVIDE
* MULTIPLY
% MODULAR(Percentage)
2. Relational Operators OR Comparison Operators:
Relational or Comparison operators are used to check the condition or compares the data. These operators are used in where condition to get the desired output.
Operator Description
= Equal To
> Greater Than
< Less Than
<= Less than or equal to
>= Greater than or equal to
< > Not Equal to
!= Not Equal to
These operators uses in WHERE condition.
3. Logical Operators:
Logical Operators also uses in WHERE condition. These are used to get the output values based the operator.
Operator Description
AND It Returns TRUE If the following conditions are TRUE. If either is false then it return FALSE
OR It Return TRUE if any one of the condition is TRUE. If both are FALSE Then it Returns FALSE
NOT It Returns TURE, If the following condition is FALSE. Returns false if the condition is TRUE
4. Special Operators:
These operators also like conditional operators. These are used to compares one expression with another. The result can be TRUE, FALSE and UNKNOWN.
Operator Description
IN It is used to Pick the values one by one from the List(same like =).
NOT IN This operator used to not pick the values from the list( Like not equal).
IS NULL This operator is used to pick only the null values and it returns TRUE.
IS NOT NULL This is opposite to IS NULL operator. This won't pick Null Values.
BETWEEN This operator is used to pick the values in BETWEEN the specified condition.
NOT BETWEEN This opposite to BETWEEN. This will pick other than specified set of values.
LIKE This is used to search a value from the table by specifying the first or middle or last character. So that system matches the specified value and return the output.
NOT LIKE This have the opposite functionality of the LIKE operator.
In my coming Blog, I will explain In-Detailed about the operators with examples. If you have any doubts, Please drop a comment below.
Thank You
Comments
Post a Comment