Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

ALL

ALL

The ALL command returns true if all values in the subquery meet the condition.

The subsequent SQL statement returns TRUE and lists the product names if every record in the OrderDetails table has a quantity of 10.

Example

SELECT ProductName
FROM Products
WHERE ProductID = ALL (SELECT ProductID FROM OrderDetails WHERE Quantity = 10);