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 get second highest salary in SQL(as/4000

Answer Posted / mohamed shahid

select * from (select sal,rownum rn from(select sal from emp order by sal desc)) where rn=2;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?

1123


How can you get sql*loader to commit only at the end of the load file? : aql loader

1060


How do I count rows in sql?

1051


What are few of the schema objects that are created using PL/SQL?

1081


what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba

1019


What are triggers and its uses?

1095


What is the difference between instead of trigger and after trigger?

1067


what are the properties and different types of sub-queries? : Sql dba

1075


How do we use distinct statement? What is its use?

1075


What is exception? What are the types of exceptions?

1115


What is sql and db2?

1054


What is a relationship and what are they?

1228


Can we create table inside stored procedure?

1014


What is update query?

1033


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

1172