SQL - Select ANY operator with using sub query

 Most of the online guide provide Select ANY operator with sub query, for example

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

It is possible not to use sub query, at least for PostgreSQL, and the working syntax is

SELECT ProductName FROM Products WHERE ProductName = ANY('{Samsung}');


Comments

Popular Posts