Back to questions
JuniorTheoryCommon
How many rows does the query return?
// Заказ: ручка, клей, ластик
// Поступление: ручка 10
ВЫБРАТЬ
Заказ.Товар КАК Товар,
ЕСТЬNULL(Поступление.Количество, 0) КАК Количество
ИЗ
Документ.Заказ.Товары КАК Заказ
ЛЕВОЕ СОЕДИНЕНИЕ Документ.Поступление.Товары КАК Поступление
ПО Поступление.Товар = Заказ.Товар
ГДЕ
Поступление.Количество = 00
- Expecting
ЕСТЬNULLin the field list to replaceNULLinГДЕas well: the condition checks the original field - Expecting
NULL = 0to be true: a comparison withNULLis never true, such rows are found withЕСТЬ NULL
- How do you rewrite the condition so the query returns the goods with no receipts?
- How does
NULLin a query differ fromНеопределеноin the built-in language?