how to find the second highest salary in a given table????
Answers were Sorted based on User's Feedback
Answer / kedar
select max(salary) from employees where salary < (select
max(salary) from employees);
the max salary is 24000
& second max is 17000
chwck out
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / shahnaz
To find the 2nd highest salary from emp table:
select max(sal) from emp where sal not in (select max(sal)
from emp )
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / manikandan. s
This is the nth max
SELECT salary
FROM (SELECT ROWNUM sl, salary
FROM (SELECT salary
FROM employees
GROUP BY salary
ORDER BY salary))
WHERE sl = n
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / mahesh
SELECT *
FROM (SELECT ROWNUM sl, salary
FROM (SELECT DISTINCT salary
FROM employees
ORDER BY salary))
WHERE sl = n
| Is This Answer Correct ? | 0 Yes | 0 No |
SELECT MAX( Sal ), LEVEL
FROM Emp
WHERE LEVEl = &Givelevelno
CONNECT BY PRIOR Sal > Sal
GROUP BY LEVEL;
| Is This Answer Correct ? | 0 Yes | 0 No |
Please explain joins in oracle?
when a grant option is encountered for a table EMP to a peer sitting beside you who has already having the table of that name (EMP), then what is the result?
How will you identify oracle database software release?
How to update values in a table in oracle?
What is oracle thin client?
What are the uses of synonyms?
26. Display the earliest shipping date in the format: DD/MON/YYYY
How to create index-by table in oracle?
I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database
What privilege is needed for a user to delete rows from tables in another schema?
SQLERRM is a a. Constraint b. Pre Defined Exception c. Pseduocolumn d. Constant e. None of Above.
How to change system global area (sga) in oracle?