IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to retreive the first 10 rows of a table ?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manjithota

New User


Joined: 09 Jun 2005
Posts: 10

PostPosted: Wed Jun 15, 2005 12:16 pm
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
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Wed Jun 15, 2005 2:15 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top