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 get 2nd maximum salary in an employee table ?

Answer Posted / babbu

it's easy with self join:
select max(sal) from emp e1,emp e2 where e1.sal < e2.sal

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different datatypes available in PL/SQL?

1081


what is primary key? : Sql dba

1023


Explain what is sql*plus?

1138


What are pl/sql cursors?

1047


What is the clause we need to add in function body to return variable?

1009


Explain about various levels of constraint.

939


What are the benefits of pl/sql packages?

1104


What is the requirement of self-join?

1116


What is sql trigger example?

1049


How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?

1105


What is an example of translating a date into julian format?

1114


what is the stuff function and how does it differ from the replace function? : Sql dba

1043


what is union, minus and interact commands? : Sql dba

1181


What pl/sql package consists of?

1076


How can you fetch first 5 characters of the string?

1009