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 / ram achare

for 2nd highest salary
select sal from(select distinct sal from emp order by sal desc limit 2)emp order by salary limit 1;
for 3rd highest salary
select sal from(select distinct sal from emp order by sal desc limit 3)emp order by salary limit 1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to rename an existing table in mysql? : Sql dba

1065


Is sql developer case sensitive?

1005


How do I view a sql database?

1023


What is equi join in sql?

1083


What is a data definition language?

1144


How do you concatenate in sql?

1032


Explain the advantages and disadvantages of stored procedure?

1153


Is natural join and inner join same?

932


what is the difference between inner and outer join? Explain with example. : Sql dba

1034


What are predefined functions in sql?

1051


Explain the insert into statements in sql?

1010


Can there be 2 primary keys in a table?

1002


How do I partition a table in sql?

1138


What is the difference between left and left outer join?

951


Is delete faster than truncate?

1007