Answer the question
In order to leave comments, you need to log in
SQL query to display all orders with a specific set of products?
MS SQL server
Table with products and order numbers to which they belong
. It is necessary to get only orders highlighted in yellow by a query
Answer the question
In order to leave comments, you need to log in
SELECT Таблица_1.[ID заказа]
FROM Таблица AS Таблица_1
INNER JOIN Таблица AS Таблица_2 ON Таблица_1.[ID заказа] = Таблица_2.[ID заказа]
WHERE (Таблица_1.[ID товара] = 'Товар 1') AND (Таблица_2.[ID товара] = 'Товар 2')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question