RECORDS(n,m) SQL Keyword

Previous Next

The RECORDS keyword limits the number of records returned in the result set.

SELECT     RECORDS(n, m) * 

FROM       <table>


where n>0, m>0, and n<=m.

If a SELECT statement that includes RECORDS also has an ORDER BY clause, the records to be returned are selected from the ordered result set. The entire result set is built in the specified order and the records between n and m in the ordered result set are returned.


SELECT     RECORDS( 3,5 ) * 

FROM       employee


This statement returns records 3, 4 and 5 from the employee table.