exam questions

Exam 1z0-082 All Questions

View all questions & answers for the 1z0-082 exam

Exam 1z0-082 topic 1 question 39 discussion

Actual exam question from Oracle's 1z0-082
Question #: 39
Topic #: 1
[All 1z0-082 Questions]

Which two statements are true about the results of using the INTERSECT operator in compound queries? (Choose two.)

  • A. Column names in each SELECT in the compound query can be different
  • B. The number of columns in each SELECT in the compound query can be different
  • C. Reversing the order of the intersected tables can sometimes affect the output
  • D. INTERSECT returns rows common to both sides of the compound query
  • E. INTERSECT ignores NULLs
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
danito
Highly Voted 4 years, 7 months ago
I think A D
upvoted 19 times
ama
4 years, 6 months ago
D yes but A no! The reason why B is wrong is Illustrated here: in case of two compound Statements : The number and the order of columns must be the same in the two queries. https://www.oracletutorial.com/oracle-basics/oracle-intersect/
upvoted 1 times
SimoneF
4 years ago
The number has to be the same but the names can be different. In that page you linked, in fact, I see no reference to the fact that the names must be the same, even though they are in the example.
upvoted 3 times
...
...
Ekos
4 years ago
i agree
upvoted 1 times
...
...
you1234
Highly Voted 4 years, 6 months ago
A & D is correct one
upvoted 9 times
...
ArchieVon
Most Recent 2 months ago
The correct answers are: D. INTERSECT returns rows common to both sides of the compound query E. INTERSECT ignores NULLs Explanation: D. INTERSECT returns rows common to both sides of the compound query: The INTERSECT operator returns only the rows that are present in both queries (i.e., rows common to both result sets). If a row exists in one query's result but not the other, it will not appear in the INTERSECT result. E. INTERSECT ignores NULLs: INTERSECT treats NULL values as equal when comparing rows, which means if two rows contain NULL in the same position, they are considered identical for the purpose of intersection. However, NULL values do not affect whether a row is included in the result set as long as the rows are otherwise identical.
upvoted 1 times
...
nautil2
1 year, 3 months ago
Selected Answer: AD
A - TRUE; Release 19, SQL Language Reference, 9 SQL Queries and Subqueries, The UNION [ALL], INTERSECT, MINUS Operators; The corresponding expressions in the select lists of the component queries of a compound query must match in number and must be in the same data type group (such as numeric or character). => column names can be different, important is a datatype B - FALSE; see A, there's a mention: The corresponding expressions in the select lists of the component queries of a compound query must match in number ... C - FALSE; Release 19, SQL Language Reference, 4 Operators, Set Operators; All distinct rows selected by both queries => order is not important D - TRUE; see C E - FALSE; https://blog.jooq.org/how-to-use-sql-intersect-to-work-around-sqls-null-logic/ Like UNION or EXCEPT (MINUS) in Oracle, as well as SELECT DISTINCT, these set operations handle two NULL values as NOT DISTINCT. Yes, they’re not equal but also not distinct.
upvoted 1 times
...
auwia
1 year, 6 months ago
Selected Answer: AD
If you read fast the A looks like False, but if you get the particular "column name" then it's easy to say True. My final answers: A, D.
upvoted 1 times
...
josue1
2 years, 6 months ago
Selected Answer: AD
-> example tables t1 and t2 in 19.3. SQL> select * from t1 /*rows: 1,2,3,null*/; N ---------- 1 2 3 4 rows selected. SQL> select * from t2 /*rows: 2,null*/; NN ---------- 2 2 rows selected. --> Test A, D and E. SQL> select n from t1 2 intersect 3 select nn from t2; N ---------- 2 2 rows selected. --> Test B SQL> select n, n from t1 2 intersect 3 select nn from t2; select n, n from t1 * ERROR at line 1: ORA-01789: query block has incorrect number of result columns --> Test C SQL> select nn from t2 2 intersect 3 select n from t1; NN ---------- 2 2 rows selected. Summary: A. Column names in each SELECT in the compound query can be different --> True B. The number of columns in each SELECT in the compound query can be different --> False C. Reversing the order of the intersected tables can sometimes affect the output --> False D. INTERSECT returns rows common to both sides of the compound query --> True E. INTERSECT ignores NULLs --> False
upvoted 1 times
...
Franky_T
2 years, 8 months ago
Selected Answer: AD
A is correct. Column names in a compound query is not important, column data types are as well as the number of columns. B is wrong. Compound queries must have the same amount of columns in each of the query blocks. C is wrong. Intersect shows rows that are common to both queries so the order of the query blocks do not matter. D is correct. This is the purpose of the INTERSECT operator. E is wrong. NULLS are processed in SET queries.
upvoted 1 times
...
ryuah
3 years ago
A,D is correct
upvoted 1 times
...
Sharif1
4 years, 5 months ago
A, D are correct.
upvoted 6 times
...
NowOrNever
4 years, 5 months ago
AD are correct https://www.examtopics.com/discussions/oracle/view/8224-exam-1z0-071-topic-1-question-239-discussion/
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago