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 are actual parameters and formal parameters?

1033


give the syntax of grant and revoke commands? : Sql dba

1087


What are sql procedures?

961


What is delete command in sql?

1050


Can we call a function containing dml statements in a select query?

916


What is composite data type in pl sql?

1029


Can we use two order by clause in query?

918


Does sql require a server?

941


Is pl sql better than sql?

975


how to see the create table statement of an existing table? : Sql dba

945


What is a full join sql?

980


What is clause in sql?

1050


Can you have more than one key in a database?

890


What is the difference between sql and mysql?

1050


What are the limitations of sql express?

984