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 / hari chaudhary

All My friend use this query then good result of your sql
database find in second or Third last data find.....

Select distinct(salary) From employee E1 Where
(n-1) = (Select Count(Distinct(E2.salary)) From employee E2
Where E2.salary > E1.salary)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is left join in postgresql?

1046


How many aggregate functions are available there in sql?

983


Which join condition can be specified using on clause?

952


Does pl sql work in mysql?

980


How do I clear the screen in sql plus?

1041


what are the differences between char and varchar? : Sql dba

1070


what are ddl statements in mysql? : Sql dba

1201


Which is better join or inner query?

1048


how can you create an empty table from an existing table? : Sql dba

1154


What are tables in sql?

1065


What is the use of function "module procedure" in pl/sql?

1196


What does dml mean?

986


Differentiate pl/sql and sql?

1065


Can we use joins in subquery?

1163


What are the types of sql commands?

1103