- SQL Basics
- SQL Home
- SQL Syntax
- SQL RDBMS
- SQL Databases
- SQL Data Types
- SQL Operators
- SQL Expressions
- SQL Database
- SQL Create Database
- SQL Select Database
- SQL Drop Database
- SQL Table
- SQL Create Table
- SQL Drop Table
- SQL Keywords
- SQL Insert Into
- SQL Select
- SQL Where
- SQL And & Or
- SQL Update
- SQL Delete
- SQL Like
- SQL Select Top
- SQL Group By
- SQL Order By
- SQL Distinct
- SQL In
- SQL Between
- SQL Joins
- SQL Joins
- SQL Inner Join
- SQL Left Join
- SQL Right Join
- SQL Full Join
- SQL Constraints
- SQL Constraints
- SQL Unique
- SQL Not Null
- SQL Primary Key
- SQL Foreign Key
- SQL Check
- SQL Default
- SQL Create Index
- SQL Advance
- SQL Aliases
- SQL Union
- SQL Auto Increment
- SQL Views
- SQL Dates
- SQL Transactions
- SQL Injection
- SQL Test
- SQL Online Test
- Give Online Test
- All Test List
SQL Operators
Operators in SQL, are used to perform the operation(s). There are four types of operators available in SQL:
- Arithmetic Operators
- Comparison Operators
- Logical Operators
- Negation Operators
SQL Arithmetic Operators
Here are the list of all the arithmetic operators available in SQL:
Operator Symbol | Operator Name |
---|---|
+ | Addition Operator |
- | Subtraction Operator |
* | Multiplication Operator |
/ | Division Operator |
% | Modulus Operator |
SQL Comparison Operators
The following table lists the comparison operators available in SQL:
Operator | Meaning |
---|---|
= | This operator is used to check whether the value of the two operands are equal to not. If yes then the condition becomes true, otherwise false |
!= | This operator is used to check whether the value of the two operands are equal or not. If not equal, then the condition becomes true, otherwise false |
<> | This operator is used to check whether the value of the two operands are equal or not. If not equal, then the condition becomes true, otherwise false |
> | This operator is used to check whether the value of the left operand is greater than the value of the right operand or not. If yes, then the condition becomes true, otherwise false |
< | This operator is used to check whether the value of the left operand is less than the value of the right operand or not. If yes, then the condition becomes true, otherwise false |
>= | This operator is used to check whether the value of the left operand is greater than or equal to the value of the right operand or not. If yes, then the condition becomes true, otherwise false |
<= | This operator is used to check whether the value of the left operand is less than or equal to the value of the right operand or not. If yes, then the condition becomes true, otherwise false |
!< | This operator is used to check whether the value of the left operand is not less than the value of the right operand or not. If yes, then the condition becomes true, otherwise false |
!< | This operator is used to check whether the value of the left operand is not greater than the value of the right operand or not. If yes, then the condition becomes true, otherwise false |
SQL Logical Operators
Here, the following table lists all the logical operators available in SQL:
Operator | Name | Meaning |
---|---|---|
ALL | All Operator | This operator is used to compare a value to all the values in another value set |
AND | AND Operator | This operator allows the existence of multiple conditions in an SQL statement's WHERE clause |
ANY | ANY Operator | This operator is used to compare a value to any applicable value in the list according to the condition |
BETWEEN | BETWEEN Operator | This operator is used to search for the values that are within a set of values, given the minimum value and the maximum value |
EXISTS | EXISTS Operator | This operator is basically used to search for the presence of a row in a specified table that meets certain criteria |
IN | IN Operator | This operator is basically used to compare a value to a list of literal values that have been specified |
LIKE | LIKE Operator | This operator is basically used to compare a value to similar values using the wildcard operators |
OR | OR Operator | This operator is used to combine multiple conditions in an SQL statement's WHERE clause |
IS NULL | NULL Operator | This operator is used to compare a value with a NULL value |
UNIQUE | UNIQUE Operator | This operator is used to search every row of a specified table for the uniqueness |
NOT | NOT Operator | This operator is used to reverse the meaning of the logical operator |
« Previous Tutorial Next Tutorial »
Like/Share Us on Facebook 😋