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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm

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