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

Why is sql better than hql?

1065


How to pipe multiline string to isql?

1054


How do I make sql search faster?

1044


what is the use of set statement in tsql? : Transact sql

1063


Can a table contain multiple primary key’s?

1156


What are the types of join and explain each?

1102


Is a view faster than a stored procedure?

1013


What is an alias command?

1119


What is sql keyword?

1046


What are predefined functions in sql?

1109


What are the advantages of pl sql?

1167


How many types of literals are available in pl sql?

1166


How to connect a sql*plus session to an oracle server?

1176


What are all the different types of indexes?

1198


how to create a test table in your mysql server? : Sql dba

1057