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

how to find the second highest salary from emp table?

Answer Posted / lakshmi

select * from (select *,rowcount()over (orderby emp desc)as
rank from emp)b where rank=2

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between subquery and correlated query?

1119


what are aggregate and scalar functions? : Sql dba

1110


what is 'mysqladmin' in mysql? : Sql dba

1076


What are the advantages of sql?

1100


what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba

1010


What is auto increment feature in sql?

1174


what is sub-query? : Transact sql

1161


Can primary key be changed?

955


How to add new employee details in an employee_details table with the following details

1137


Are there any features that are decommissioned in 11g that are not present in 11g?

2197


Why is %isopen always false for an implicit cursor?

1153


How many types of index are there?

1102


how to run 'mysql' commands from a batch file? : Sql dba

1171


Why plvtab is considered as the easiest way to access the pl/sql table?

1292


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

1058