Suppose it is desired that UNION operation should return not more than 3 rows. Which keyword is used for this?
A. LIMIT
B. RESTRICT
C. COUNT
D. SORT
Answer: Option A
Solution (By Examveda Team)
This question asks about a way to limit the number of rows returned from a UNION operation in MySQL. UNION combines the results of multiple SELECT statements into a single result set.Let's look at the options:
Option A: LIMIT
The LIMIT keyword is used to limit the number of rows returned by a query. This is the correct answer.
Option B: RESTRICT
RESTRICT is not a valid keyword in MySQL for limiting results.
Option C: COUNT
COUNT is used to count the number of rows in a result set, but it doesn't limit the number of rows returned.
Option D: SORT
SORT is used to order the rows in a result set, but it doesn't limit the number of rows returned.
In conclusion:
To limit the number of rows returned by a UNION operation to 3, you would use the LIMIT keyword.
Related Questions on MySQL Miscellaneous
How is communication established with MySQL?
A. SQL
B. Network calls
C. A programming language like C++
D. APIs
Which type of database management system is MySQL?
A. Object-oriented
B. Hierarchical
C. Relational
D. Network
Join The Discussion