Which two statements are true regarding subqueries?

Which two statements are true regarding subqueries? (Choose two.)

Which two statements are true regarding subqueries? (Choose two.)

A.
The ORDER BY clause can be used in the subquery.

B.
A subquery can be used in the FROM clause of a SELECT statement.

C.
If the subquery returns NULL, the main query may still return result rows.

D.
A subquery can be placed in a WHERE clause, GROUP BY clause, or a HAVING clause.

E.
Logical operators, such as AND, OR and NOT, cannot be used in the WHERE clause
of a subquery.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


bogdan

bogdan

ABC is correct:

select count(*) result from (select * from dual where 2 + 2 = 5 order by 1);

select nvl((select dummy from dual where 2 + 2 = 5), ‘C is correct’) result from dual;

select ‘C is correct’ result from dual where ((select dummy from dual where 2 + 2 = 5) is null);

RESULT
———-
0

RESULT
————
C is correct

RESULT
————
C is correct

dames

dames

If the subquery returns NULL, the main query returns ZERO rows.
This is exactly what count(*) in your example shows.

bogdan

bogdan

C is correct