What does 5 + NULL return?
Column x in table iv_t1 contains several values, including 2 and NULL. The query adds 5 to each value. What will it return?
Predict the resultNULLJuniorFrom interview write-ups: T-BankAnalystData EngineerBackendQA
Input data · iv_t1
| x |
|---|
| 1 |
| 1 |
| 2 |
| NULL |
Query
SELECT x, 5 + x AS five_plus_x
FROM iv_t1
WHERE x = 2 OR x IS NULL