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
 
select a.salary from emp a where 2 = ( select count(*) from

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sunojsm
Warnings : 1

New User


Joined: 21 Jun 2004
Posts: 33
Location: Andorra

PostPosted: Fri Apr 01, 2005 7:44 pm    Post subject: select a.salary from emp a where 2 = ( select count(*) from
Reply with quote

Hi all,

Could any one give the explanation abt this query

select a.salary from emp a where 2 = ( select count(*) from emp b where a. empno < b.empno);

where empno is primary key.............

let me have a table which has 20000 records, which has serialno as primary key starting from 0 to 20000 . i want records which has the serialno frm 10000 to 15000 . i wan t the exact query....

bye
Back to top
View user's profile Send private message

mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1207
Location: India

PostPosted: Fri Apr 01, 2005 9:29 pm    Post subject:
Reply with quote

Check this links:

http://www.ibmmainframes.com/viewtopic.php?t=1472&highlight=maximum

http://www.ibmmainframes.com/viewtopic.php?t=403&highlight=maximum
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 Count a particular record in a... Mounika Nemani DFSORT/ICETOOL 5 Tue May 29, 2018 1:07 pm
No new posts How to force a select query to abend neo4u DB2 7 Mon Apr 23, 2018 1:36 pm
No new posts SELECT TO MULIPLE OUTFIL speermb DFSORT/ICETOOL 5 Fri Mar 23, 2018 10:44 pm
No new posts Creation of Datasets dynamically on t... Raghu M N DFSORT/ICETOOL 8 Fri Mar 16, 2018 12:56 am
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm

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