MySQL UNION
- SELECT on a MERGE table is like _____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Performing a ‘SELECT’ operation on a ‘MERGE’ table is like performing ‘UNION ALL’. This means that duplicate row results are not removed. ‘SELECT DISTINCT’ is like ‘UNION’ or ‘UNION DISTINCT’.
- Which table is used to run a UNION-type query on MyISAM tables?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
When there is a need to run a ‘UNION type’ operation on a MyISAM table that has the same structures, a ‘MERGE’ table is set up for it. After this, the queries are performed on this table.
- Suppose it is desired that UNION operation should return not more than 3 rows. Which keyword is used for this?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
When there is a need to put a limit to the number of rows returned by the ‘UNION’ operation, the statement ‘LIMIT’ is appended to the ‘SELECT’ queries which are joined by the ‘UNION’ operations.
- Which clause is used to sort a UNION result as a whole?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The ‘ORDER BY’ clause is used along with the ‘UNION’ statement to sort a ‘UNION’ result as a whole. It is placed after the last ‘SELECT’ statement which is kept in parentheses.
- The UNION ALL has a higher precedence than UNION DISTINCT.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
When there is a mixture of ‘UNION’ or ‘UNION DISTINCT’ statements with the ‘UNION ALL’ statements, any distinct union operation takes precedence over any ‘UNION ALL’ operations to its left.