Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Query for selecting 100 lines from a table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Query for selecting 100 lines from a table
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: 215
Location: India

PostPosted: Tue Aug 26, 2008 2:30 pm    Post subject: Re: db2 querry
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to force a select query to abend neo4u DB2 4 Mon Apr 23, 2018 1:36 pm
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us