The below is the data in sample table of name ‘DATA’. The question is how NULL performs in expressions.
The Question: What will be result when below query executed
|COL1||COL 2||COL 3|
SELECT col1 + col2, col2 + col3, col1 + col2 / col3 FROM data;
Q) What are the three possible values returned by the sample SQL query above?
- 3, NULL, 0
- 3, 2, 0
- 3, 2, 3
- 3, NULL, NULL
- 3, 2, NULL
The correct answer is ‘Choice 4’.