Write a query to find five highest salaries from EMP table.
(there is a column SALARY)
Answer Posted / vivek dubey
this Query is wrong : " SELECT ENAME,SALARY FROM (SELECT ENAME,SAL FROM EMP ORDER BY SALARY DESC ) WHERE ROWNUM<6; " because We can not use Order by clause in SubQuery.
This Answer gives you the right data :
"
SELECT TOP 5
empsal.ENAME,
empsal.SAL
FROM
(
SELECT ENAME,SAL
FROM EMP
) AS empsal
ORDER BY empsal.SAL DESC
"
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
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
how tsql statements can be written and submitted to the database engine? : Transact sql
Is join same as left join?
What is rename command in sql?
Is it possible to read/write files to-and-from PL/SQL?
What are the subsets of sql?
What are local and global variables and their differences?
What do you understand by exception handling in pl/sql?
How do you use join?
what is 'mysqld'? : Sql dba
what is meant by nl2br()? : Sql dba
Enlist the advantages of sql.
Does view store data in sql?
How do I order columns in sql?
What will you get by the cursor attribute sql%notfound?