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

Query for MAX Salary without using MAX correlated & subQ


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinayn

New User


Joined: 13 Jun 2005
Posts: 10

PostPosted: Tue Jul 26, 2005 4:20 pm
Reply with quote

Hi,

Want the sql query for having the maximum salary in the list or employees without using MAX, any correlated or sub queries.


Thanks

vinay
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Thu Jul 28, 2005 6:47 pm
Reply with quote

you can use query like below also

select salary from emp
order by salary desc
fetch first 1 rows only;

Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top