Wednesday, November 12, 2008

DB2-Limit SQL Query

This is and example on how to limit a no of lines to display during DB2 SQL Query.

SELECT * FROM TEST.CUSTOMER WHERE LASTNAME='SMITH' FETCH FIRST 10 ROWS ONLY;

3 Comments:

Blogger Roshan Singh said...

Thanks man this really simplified my search :)

2:42 AM  
Blogger rayrosliabas said...

you're welcome. nice to know that my blog did actually helped someone :p

1:29 AM  
Blogger omasampath said...

Hi,
This query always return row set from
beginning.But I want to implements paging facility.So how can I retrieve middle row set with this.

Thanks,
Sampath

3:49 PM  

Post a Comment

<< Home