A. In a query containing multiple set operators, INTERSECT always takes precedence over UNION and UNION ALL.
Correct:
In queries with multiple set operators, the precedence order is:
INTERSECT
UNION / UNION ALL
MINUS
If parentheses are not used to explicitly define precedence, INTERSECT is evaluated before UNION or UNION ALL.
D. CHAR columns of different lengths used with a set operator return a VARCHAR2 whose length equals the longest char value.
Correct:
When CHAR columns of varying lengths are combined using a set operator, Oracle returns the result as a VARCHAR2 column whose length matches the longest CHAR value in the result set.
A. In a query containing multiple set operators, INTERSECT always takes precedence over UNION and UNION ALL.
When multiple set operators are used in a query, INTERSECT has higher precedence than UNION and UNION ALL. This means that the INTERSECT operation will be evaluated before the other set operators, unless parentheses are used to explicitly define the order of operations.
D. CHAR columns of different lengths used with a set operator return a VARCHAR2 whose length equals the longest char value.
When CHAR columns of different lengths are combined using set operators, the result is a VARCHAR2 column with a length equal to the longest CHAR value in the result set. This is due to how Oracle handles the return type when different CHAR lengths are combined.
B is incorrect because it is not mandatory to have an alias for each column in the first SELECT
select first_name ||''||last_name, employee_id
from hr.employees
union
select first_name,employee_id
from HR.EMPLOYEES
order by 1,2;
C is incorrect because the datatypes : BLOC,CLOB are not valid the set Operators.
DE is the correct answer.
According to:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries004.htm
"If both queries select values of datatype CHAR of equal length, then the returned values have datatype CHAR of that length. If the queries select values of CHAR with different lengths, then the returned value is VARCHAR2 with the length of the larger CHAR value."
AND
"In queries using set operators, Oracle does not perform implicit conversion across datatype groups. "
So DE.
B may be correct if in the end will be "order by" clause. Therefore DE correct
upvoted 2 times
...
...
Log in to ExamTopics
Sign in:
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.
Thameur01
2 weeks agoacd3ea6
3 months, 2 weeks agoBissto
4 months, 2 weeks agoyaya32
12 months agolucemqy
1 year, 2 months agoHassanMkhlalati
1 year, 4 months agokuff
1 year, 8 months agoOrxan_H
1 year, 8 months agoSagarkpvs
1 year, 9 months agoPoke90
1 year, 10 months agojfc1
1 year, 12 months agodexdinh91
2 years agoViviana3184
2 years agoanzac
2 years, 1 month agoRenad_16
2 years, 1 month agoOrxan_H
1 year, 8 months ago