Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
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: 1200
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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us