I am studying SQL from w3schools tutorial. It seems there example on ALL keywords is incorrect. I just want to confirm whether the example is wrong there or am no getting it?
SELECT ProductName FROM Products WHERE ProductID = ALL (SELECT ProductID FROM OrderDetails WHERE Quantity = 10);
Code explanation:
Given SQL statement gives TRUE and lists out the productnames if ALL the records in the OrderDetails table has quantity = 10
What I get from it is , SELECT returns us all products ID that has orders with quantity equals to 10, therefore we have list of ID.
I reported this as an error on their website but did not receive any answer. Kindly help me out with this.