Which two statements are true about the results of using the INTERSECT operator in compound queries?
A. INTERSECT ignores NULLs.
B. Reversing the order of the intersected tables can sometimes affect the output.
C. The number of columns in each SELECT in the compound query can be different.
D. INTERSECT returns rows common to both sides of the compound query.
E. Column names in each SELECT in the compound query can be different.
DE
D – all column values should matched to get into result set
E – column names can be different but number of column should be same
SQL> select a,b from t1
2 intersect
3 select c,d from t2;
A B
———- ———-
1 2
5
2 rows selected.
SQL> select * from t1
2 intersect
3 select c from t2;
select * from t1
*
ERROR at line 1:
ORA-01789: query block has incorrect number of result columns
DE
DE
DE