1.

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) SORTThis question was posed to me in a national level competition.This is a very interesting question from Performing Multiple topic in section Using SQL to Manage Data of MySQL

Answer»

The correct ANSWER is (a) LIMIT

Easiest explanation: 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.



Discussion

No Comment Found

Related InterviewSolutions