Anybody can tell me, how do we find second largest emp
salary from emp table.. Thanks in advance ...
Answer Posted / selvaraj anna university coe
Oracle 10g Using : Find 2nd Highest Salary?
SELECT * FROM emp e WHERE 2=(SELECT COUNT(DISTINCT salary)
FROM emp x
WHERE x.salary >= e.salary);
Answer :
EMP_NO EMP_NAME SALARY
--------- ------------------------- ---------
107 SARABOOT 550000
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
How to assign a tablespace to a users in oracle?
Explain a private synonyms?
How to select an oracle system id (sid)?
How do I use unicode codesets with the weblogic jdriver for oracle driver?
How to get a create statement for an existing table?
How to connect to oracle using service name instead of sid?
How to define an explicit cursor in oracle?
How to assign a table row to a record variable?
Explain the use of online redo log files in oracle.
What is oracle latest version?
What is logical backup in oracle?
How to enter a new row into a table interactively?
What privilege is needed for a user to create tables in oracle?
State all possible different index configurations a table can possibly have?
How to use like conditions in oracle?