Oracle__11. Oracle 1Z0-051 Exam - Set Operators Flashcards
List 4 common set operators?
- UNION2. UNION ALL3. INTERSECT4. MINUS
What order are set operators evaluated?
Left to Right unless parenthesis are used
What is needed in each select list used in a set?
each select must have the same number and data type of columns.
If alias are used in set operators which are used in the final results?
The first Select statement.
What is the difference between UNION and UNION ALL?
UNION eliminates duplicates.
By default what is the sort order in UNION set operator?
The first column
What happens if one select in a column is a CHAR(7) and a CHAR(10) in an Select?
The final data type is Varchar2(10) of the largest length.
What happens if one column in a select is Varchar while numeric in the same column in another select?
Oracle returns an error.There is not implicit data type conversions in set operations.
Are null columns ignored in duplicate checking of a UNION?
No
Is the output of UNION ALL sorted by default?
No
What is returned by the INTERSECT operator?
all rows that are common to the both queries.
What is returned by the minus operator?
All rows from the first table that are not in the second table.
Do column names need to be the same in tables for the INTERACT or MINUS set operators?
No
If a particular column in the select in a set operation is a VARCHAR and the same column in the other select is a TO_CHAR will it cause an error?
No
If a particular column in the select in a set operation is a Number and the same column in the other select is a value of 5 will it cause an error?
NoBoth are numbers