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 transaction control language (tcl)?

1134


Which certification is best for sql?

981


How to assign sql query results to pl sql variables?

1075


What is native sql query?

1016


define data blocks ? : Sql dba

978


What are the main features of cursor?

1071


What is difference between joins and union?

1122


What is error ora-12154: tns:could not resolve the connect identifier specified?

1075


what are myisam tables? : Sql dba

1030


How many types of relationship are there?

1027


what are date and time functions in mysql? : Sql dba

977


Does group by remove duplicates?

1039


What is autocommit sql?

985


What is a field in a database?

1063


How many indexes can be created on a table in sql?

1053