Write a query to find five highest salaries from EMP table.
(there is a column SALARY)

Answer Posted / vishnu

select level,max(sal) from emp
where level<=5
group by level
connect by prior sal>sal
order by level Asc;

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can sql servers linked to other servers like oracle? : Sql dba

536


Can we join two tables without common column?

498


Can you selectively load only those records that you need? : aql loader

600


Can a procedure in a package be overloaded?

538


What is the difference between syntax error and runtime error?

605






When you have to use a default "rollback to" savepoint of plvlog?

709


How do I count rows in sql query?

482


What is a unique key?

576


What is attribute indicator in pl sql?

514


Does sql full backup truncate logs?

516


how to extract a unit value from a date and time? : Sql dba

544


Why are indexes and views important to an organization?

518


How do I start sql profiler?

545


What is a sql select statement?

556


What is the difference between delete and truncate commands?

504