Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting number of rows retrieved and resuming from next row 2

Status
Not open for further replies.

mmehta

Programmer
Sep 20, 2000
3
0
0
CA
Is there any similar clause in SQL as
"FETCH FIRST x ROWS ONLY" to fetch rows after a certain number ?
For example, I am using
Select *
From <table_name>
Where <blah_blah_blah>
Fetch first 100 rows only;

Now if I wanted to fetch next hundred rows, how would I do it ?
I don't won't to write programs.. [sig][/sig]
 
The Fetch first clause sets a maximum number of rows that can be retrieved. It lets the database manager know that the application does not more than N number of rows.

Take off the Fetch First clause and count the number you want using an internal working storage field - then you can get whatever row count you want.... [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top