how will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / pawan

Select DISTINCT TOP 5 salary from emp_table1
UNION ALL
Select DISTINCT TOP 5 salary from emp_table2

for more details about UNION and UNION ALL check this: http://www.w3schools.com/sql/sql_union.asp

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to estimate disk space needed for an export job?

562


what is the dual table in oracle?

553


What happens if you use a wrong connect identifier?

503


Explain parameter file in oracle.

579


How to create id with auto_increment on oracle?

547






How to check your oracle database 10g xe installation?

581


How do you store pictures in a database?

563


How to connect to oracle using service name instead of sid?

553


How do I know if oracle is installed on windows?

486


How to call a sub procedure?

562


How many types of tables supported by oracle?

578


What is Undo Management Advisor in Oracle?

613


What is the difference between "as" and "is" in an oracle stored procedure?

540


Difference between oracle's plus (+) notation and ansi join notation?

577


How to create a table index?

568