From an Employee table, how will you display the record
which has a maximum salary?
Answer Posted / pradeep
To get nth rank salary or max salary two ways
below 5th
select ct , empno, sal from (SELECT max(rownum) ct , empno,
sal FROM emp group by empno, sal ORDER BY sal desc) where
ct =5;
below 2nd
select * from (
SELECT DEPTNO,ENAME,SAL,COMM,
RANK() OVER ( ORDER BY SAL DESC, COMM) poK from emp)
where pok =2;
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is an invalid partition table?
Is sql easier than java?
how can we know the count/number of elements of an array? : Sql dba
how to use 'mysql' to run sql statements? : Sql dba
what are the advantages a stored procedure? : Sql dba
Explain unique key in sql.
What is dynamic query?
what is myisam? : Sql dba
what is the difference between delete and truncate statement in sql? : Sql dba
What is sql server and ase?
how to use case expression? : Sql dba
What is the difference between pl and sql?
What is union?
Explain polymorphism in pl/sql.
What is bitemporal narrowing?