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

Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

1208


What is PL/SQL Records?

1169


Is sqlite good enough for production?

982


what is table? : Sql dba

1041


Why do we go for stored procedures?

1034


What trigger means?

967


How do you remove duplicates without using distinct in sql?

962


What is an inner join sql?

1012


What is the best free sql database?

1041


What is a delimiter in sas?

1035


What is a database event trigger?

1137


what are the different functions in sorting an array? : Sql dba

1002


How to use transactions efficiently : transact sql

1033


How do I partition a table in sql?

1104


What are all the ddl commands?

1170