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

Query for selecting 100 lines from a table


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

New User


Joined: 07 Aug 2008
Posts: 1
Location: chennai

PostPosted: Tue Aug 26, 2008 1:21 pm
Reply with quote

Need query for selecting 100 lines from a table
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Tue Aug 26, 2008 2:30 pm
Reply with quote

chinthalavijaykumar wrote:
give me the querry for selecting 100 lines from a table


If you want to select particular number of records use

"FETCH FIRST 4 ROWS ONLY"

Ex:

SELECT MIN(SALARY)
FROM (SELECT SALARY
FROM TABLE
ORDER BY SALARY
FETCH FIRST 4 ROWS ONLY)
WITH UR
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 Pulling a fixed number of records fro... DB2 2
No new posts RC query -Time column CA Products 3
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