Types of SQL Operators
SQL Arithmetic Operators
- ADD
- Subtract
- Multiple
- Divide
- Modulo
SQL Bitwise Operators
- And
- OR
- exclusive OR
SQL Comparison Operators
- Equal to
- Greater than
- Less than
- Greater than or Equal to
- Less than or Equal to
- Not equal to
SQL Logical Operators
- All
- And
- Any
- Between
- Exists
- In
- Like
- Not
- OR
- Some
SQL ALL Operator
The ANY operator is Logical operator.The ANY operator returns TRUE if any of the subquery values meet the condition.
Syntax
SELECT
[ID]
,[Category]
,[SubCategory]
,[Type]
,[Direction]
,[Model]
,[Side]
,[Supplier]
,[ItemCode]
,[ItemName]
,[PurchasePrice]
,[ReorderPoint]
,[OpeningStock]
,[Location]
,[MeasurementUnit]
FROM [tbl_ItemR]
WHERE PurchasePrice = ANY (SELECT PurchasePrice FROM [tbl_ItemR] WHERE PurchasePrice >= 4000);
[ID]
,[Category]
,[SubCategory]
,[Type]
,[Direction]
,[Model]
,[Side]
,[Supplier]
,[ItemCode]
,[ItemName]
,[PurchasePrice]
,[ReorderPoint]
,[OpeningStock]
,[Location]
,[MeasurementUnit]
FROM [tbl_ItemR]
WHERE PurchasePrice = ANY (SELECT PurchasePrice FROM [tbl_ItemR] WHERE PurchasePrice >= 4000);
The result of above SQL Statement is shown in Fig. below.
The result set shows that purchase price of any item(s) is greater than or equal to 4000, returned by ANY Operator.
For further question please mail: brainstormiert@gmail.com
For further question please mail: brainstormiert@gmail.com
SQL Between and Not Between Operators
SQL All Operator
SQL And Operator