how to find the first two highest salaries in deptno in emp
table

Answers were Sorted based on User's Feedback



how to find the first two highest salaries in deptno in emp table..

Answer / santhosh kandula


if u want select the second highest salary from the emp
table then u have to write query as

select max(salary) from emp where
salary < ( select max(salary) from emp )

Is This Answer Correct ?    6 Yes 1 No

how to find the first two highest salaries in deptno in emp table..

Answer / ajitnayak

select e.*
from emp e
where rownum < 3
order by e.sal desc ;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB Development Interview Questions

What are the three basic rules which are to be followed for the relational model of the database?

0 Answers  


Explain about the relational database?

0 Answers  


Where is dbms used?

0 Answers  


What you can do to remove data from the cache and query plans from memory for testing the performance of a query repeatedly?

0 Answers  


What is dbms and its application?

0 Answers  






How you can make a parameterized view?

0 Answers  


Explain about post-relational databases?

0 Answers  


Who are end users in dbms?

0 Answers  


Can you have a nested transaction?

1 Answers  


What are defaults? Is there a column to which a default can't be bound?

2 Answers  


What are the main phases of database development?

0 Answers  


What are the types of database model?

0 Answers  


Categories