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

select a.salary from emp a where 2 = ( select count(*) from


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1215
Location: India

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

Check this links:

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

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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts count contained values of several col... DB2 4
No new posts DB2 Query to get the count of Unique ... DB2 2
No new posts CA7 count with DATE variable CA Products 0
No new posts Inserting into table while open selec... DB2 1
No new posts To get the count of rows for every 1 ... DB2 3
Search our Forums:


Back to Top