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

[Solved]about db2 sql query: how to fetch first 5 rows


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

New User


Joined: 25 Mar 2006
Posts: 15
Location: pune(India)

PostPosted: Thu Apr 13, 2006 7:12 pm
Reply with quote

could any body plz tell me how to fetch first 5 rows from the table using sql
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Apr 13, 2006 7:52 pm
Reply with quote

ysuryawanshi_mcs,

Code:

SELECT *
  FROM DB2.YOUR_TABLE
FETCH FIRST 5 ROWS ONLY;


Dave
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DB2 Query to get the count of Unique ... DB2 2
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 1
No new posts Reflection 3270 screen shows only 23 ... Compuware & Other Tools 6
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 5
No new posts To get the count of rows for every 1 ... DB2 3
Search our Forums:


Back to Top