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 / chiru

select distinct sal from emp e where 2=(select
count(distinct sal) from emp where e1.sal>e.sal) order by
sal desc;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you declare a user-defined exception?

1077


Is primary key clustered index?

993


What does rownum mean in sql?

1091


What is the usage of sql functions?

1206


How do I debug a stored procedure?

1171


How many rows can sqlite handle?

1163


Why are aggregate functions called so?

1012


What does where 1/2 mean in sql?

1145


How do I make my sql query run faster?

1018


Explain what is a database?

1136


What is dense_rank?

989


What are the types of dbms?

1027


What view means?

1025


how many values can the set function of mysql take? : Sql dba

1039


How do I edit a stored procedure?

1051