Answer:
The FETCH FIRST clause sets a maximum number of rows that can be retrieved. FETCH FIRST specifies that only integer rows should be made available to be retrieved, regardless of how many rows there might be in the result table when this clause is not specified. An attempt to fetch beyond integer rows is handled the same way as normal end of data. The value of integer must be a positive integer (not zero). The default is 1.
Ex-
SELECT FIRSTNME
FROM EMP
ORDER BY SALARY DESC
FETCH FIRST 5 ROWS ONLY;
Asked In: Many Interviews |
Alert Moderator