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 dml and ddl?
what is the difference difference between procedure and packages
what is data manipulation language? : Sql dba
What is sql*loader?
how to create a table index in mysql? : Sql dba
How can I get the number of records affected by a stored procedure?
What is a dynamic query?
what is sql in mysql? : Sql dba
what are the advantages and disadvantages of views in a database? : Sql dba
what are aggregate and scalar functions? : Sql dba
What are the three forms of normalization?
What is varchar example?
What is trigger and how to use it in sql?
What is difference between mysql and postgresql?
What does data normalization mean?