Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
how to retreive the first 10 rows of a table ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
manjithota

New User


Joined: 09 Jun 2005
Posts: 10

PostPosted: Wed Jun 15, 2005 12:16 pm    Post subject: how to retreive the first 10 rows of a table ?
Reply with quote

spse in a table , we don't have any information about any of the column values.
then how to retrieve the first N no of rows and that too without using cursors and using sql queries only ?
Back to top
View user's profile Send private message
References
PostPosted: Wed Jun 15, 2005 12:16 pm    Post subject: Re: how to retreive the first 10 rows of a table ? Reply with quote

ovreddy

Active User


Joined: 06 Dec 2004
Posts: 200
Location: Keane India Ltd., Hyderabad

PostPosted: Wed Jun 15, 2005 2:15 pm    Post subject:
Reply with quote

Hi ,

You can use the following SQL QUERY to fetch first N rows of a table.

SELECT * FROM <<TABLE>> FETCH FIRST 10 ROWS ONLY;

Thanks,
Reddy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1