Home >> SQL >> All in SQL

All in SQL

ALL is used with three operator-

1)-< ALL-It means less than the min value in the list.

2)-= ALL-It means can not equal to any value in the list.

3)-> ALL-It means greater than the max value in the list.

Syntax

SELECT columnname FROM tablename WHERE columnname operator ALL(SELECT column_name FROM table_name WHERE condition);

Example

SELECT product_name FROM products WHERE product_id = ALL(SELECT product_id FROM orders WHERE quantity= 8);

Post Your Comment

Next Questions
Max
Min
Avg
Count
Sum

Copyright ©2022 coderraj.com. All Rights Reserved.