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 / mangesh pardhi

SELECT salary
FROM employee e
WHERE 2=(SELECT COUNT(DISTINCT salary)
FROM employees
WHERE e.salary<=salary)
--replace the number with 2,3,4 u wil find the that position
salary

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is left join same as join?

936


Is join an inner join?

895


What are sql functions? Describe the different types of sql functions?

1056


What is query execution plan in sql?

1127


How do I tune a sql query?

933


Why do we use %rowtype & %type in plsql?

991


How do I run a sql query in pgadmin 4?

904


What are character functions?

1039


Which join is like inner join?

974


how to fetch alternate records from a table? : Sql dba

1050


What is the difference between partition and index?

922


explain mysql aggregate functions. : Sql dba

939


Can a trigger call a stored procedure?

1000


Is sql a case sensitive language?

890


Why do we use function in pl sql?

1005