ANY is used with three operator-
1)-< ANY-It means less than the max value in the list.
2)-= ANY-It means equal to any value in the list(similar to IN operator).
3)-> ANY-It means greater than the minimum value in the list.
Syntax
SELECT columnname FROM tablename WHERE columnname operator ANY (SELECT column_name FROM table_name WHERE condition);
Example
SELECT product_name FROM products WHERE product_id = ANY (SELECT product_id FROM orders WHERE quantity= 8);
Copyright ©2022 coderraj.com. All Rights Reserved.