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

how to select first 5 records from a table? : Sql dba

1028


Is and as keyword in pl sql?

1013


What are the types of join in sql?

1149


how to fetch alternate records from a table? : Sql dba

1166


How do you go back in sql?

1029


What is sap sql?

1030


What is data control language?

1033


What is trigger in pl sql?

1048


Compare sql & pl/sql

1211


what is the difference between char_length and length? : Sql dba

1110


What is db journal file?

1155


What is a nested table in word?

1009


what is innodb? : Sql dba

1172


Explain the types of joins in sql?

1073


Is sql a scripting language?

1086