Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 67

Examine this statement:

What is returned upon execution?

    Correct Answer: A

    The statement will return an error because of the ORDER BY clause in this context. The ORDER BY clause is used in conjunction with a SELECT statement to sort the resulting rows. However, in the provided SQL statement, the columns are being referenced by their position in the result set. Since the third column in the SELECT statements is NULL, using ORDER BY 3 causes an invalid reference to the column position, resulting in an error.

Discussion
zouveOption: D

D tested select 1 as id, 'john' as first_name, NULL as commission from dual intersect select 1, 'john' as name, null from dual order by 3;

J4viOption: D

It returns 1 row, because the values are the same. I do tested as well

lucemqyOption: D

INTERSECT will only keep rows that exists for both tables so only 1 row remaining

metallersOption: D

Checked

Rik92Option: C

tested on 19c, returns 0 rows.

DiDivision

it does return 1 rows, it is fast to test.

9ramone7

tested on livesql.oracle.com and it does produce 1 row