Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Query for second maximum salary in each in each department

Answer Posted / sureshramsing

select * from(select row_number() over(partition by deptno order by sal desc) rn,a.* from emp a) where rn=1;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain the difference between delete , truncate and drop commands? : Sql dba

1015


Are subqueries faster than joins?

949


Does pl sql work in mysql?

919


What is the use of & in pl sql?

985


How do I run a pl sql procedure in sql developer?

912


Is it possible to sort a column using a column alias?

991


How would you reference column values before and after you have inserted and deleted triggers?

1016


How to assign sql query results to pl sql variables?

991


Write a sql select query that only returns each name only once from a table?

959


What is rownum and rowid?

983


What is the difference between an inner and outer join?

960


What is crud stand for?

931


What is an exception in pl/sql?

1005


What is application trigger?

945


What are user defined functions?

947