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
Explain character-manipulation functions?
How do you remove duplicates without using distinct in sql?
What is sp_helptext?
Does pl/sql support create command?
What is varray in pl sql?
What is index example?
What is integrity in sql?
how to use in conditions? : Sql dba
How do you update sql?
What are the advantages of sql? Explain
What is pl sql commands?
What are the types of records?
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
What do you mean by field in sql?
explain commit and rollback in mysql : sql dba