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

seleting a specific number of rows in SPUFI(DB2I)


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

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Wed Feb 15, 2006 4:37 pm
Reply with quote

If we have 100 records and we want to display the first 10 records without using a program using just pure SQL query how do we do it.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Feb 15, 2006 5:17 pm
Reply with quote

Use the following Query

Quote:
SELECT * FROM TABNAME FETCH FIRST 10 ROWS ONLY;


Also view this link

ibmmainframes.com/viewtopic.php?t=8529&highlight=fetch

Plz use Search option in this forum
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 DELETE SPUFI DB2 1
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 Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top