Flash cards
Review the key moves
What is the main idea behind SQL ANY Keyword?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
Which statement best captures the main point of this lesson?
Complete the missing token from the example code.
___ ProductNamePut the learning moves in the order that makes the concept easiest to apply.
Any
The ANY command returns true if any of the subquery values meet the condition.
The following SQL statement returns TRUE and lists the productnames if it finds ANY records in the OrderDetails table where quantity = 10:
Example
SELECT ProductName
FROM Products
WHERE ProductID = ANY (SELECT
ProductID FROM OrderDetails WHERE Quantity = 10);The following SQL statement returns TRUE and lists the productnames if it finds ANY records in the OrderDetails table where quantity > 99:
Example
SELECT ProductName
FROM Products
WHERE ProductID = ANY (SELECT ProductID
FROM OrderDetails WHERE Quantity > 99);