Being a query language, SQL ultimately generates results for the user by extracting it from the database/tables. Hence, SQL supports the use of operator i.e. SQL operators are used while performing any kind of operation on databases/tables.
For this, SQL provides the luxury of four types of operations that can be performed on the database/tables according to the need. These operators are namely :
Arithmetic Operators.
Bit-wise Operators.
Comparison Operators.
Logical Operators.
SQL Operators : Arithmetic
Arithmetic operators are used in SQL to perform basic arithmetic operations including :
SQL Arithmetic Operator
SQL Operators : Comparison
Whenever comparison needs to be done, comparison operators can be used. Some of the comparison operators are:
SQL Comparison Operators
SQL Operators : Bit-wise
Bit-wise operators are used to perform bit-wise operations(0 & 1) over the expressions which includes :
SQL Bitwise Operators
SQL Operators : Logical
Logical SQL operators are used between queries or used to join two or more conditions or used to extract some specific values. Some of the logical operators are :
SQL Logical Operators
In case of sub-queries, Operators like “ALL”, “ANY”, “EXISTS” and “SOME” are used.