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 is benefit of creating memory optimized table?

1034


How many functions are there in sql?

1096


What is cascade in sql?

1017


What is rename in sql?

1019


What is database migration?

1012


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

1083


What is a join?

1109


How do you declare a user-defined exception?

1077


Can we rename a column in the output of sql query?

1042


How do you run a query?

1051


What if we write return in procedure?

1514


What is difference between hql and sql?

1166


Do prepared statements prevent sql injection?

1000


What is anonymous block in sql?

1174


Why function is used in sql?

992