Back to questions
JuniorTheoryCommon
How many rows does the query return?
// Заказ: ручка, клей, ластик
// Поступление: ручка 10, ручка 5, тетрадь 7
ВЫБРАТЬ
Заказ.Товар КАК Товар,
Поступление.Количество КАК Количество
ИЗ
Документ.Заказ.Товары КАК Заказ
ЛЕВОЕ СОЕДИНЕНИЕ Документ.Поступление.Товары КАК Поступление
ПО Поступление.Товар = Заказ.Товар4
- Expecting a left join to return exactly one row per left row: every match on the right gives a row of its own
- Expecting rows without a match to vanish: a left join keeps them, with
NULLin the right table's fields
- How many rows does the same query return with an inner join?
- How do you get one row per ordered item with the total received?