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...

Write a query to find second highest salary of an employee.

Answer Posted / rajasekhar.v

For selecting Nth highest salary...

SQL> select rownum rank,ename,sal from
(select ename,sal from emp order by sal desc)
group by rownum,ename,sal
having rownum = &n;
'n' may be any valid number required..

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default isolation level in sql server? : Transact sql

961


What is numeric function sql?

983


Does sql require a server?

941


Which one is better subquery or joins?

1007


Can you join views in sql?

896


What is the best partition size for windows 10?

946


What are the different types of sql commands?

1056


What is trigger types of trigger?

990


What will you get by the cursor attribute sql%rowcount?

970


what is the difference between union and union all? : Sql dba

973


What is a primary key? Explain

919


how to use case expression? : Sql dba

957


Which is better cte or subquery?

970


What are sql constraints?

1122


Enlist the advantages of sql.

937