Skip to content
Advertisement

SQL where clause to check if all selected column value is in a subquery select

Does the select concept below can be translated into an sql select?

The concept of this is like below:

item1, item2, and item3 should all be in (select ITEMS from table)

The select statement should only return a row/s if all S_ID is in (select S_ID from table2)

Advertisement

Answer

If you want S_IDs all of whose items are in the second table, then use aggregation

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement