how to get second highest salary in SQL(as/4000

Answer Posted / mohamed shahid

select * from (select sal,rownum rn from(select sal from emp order by sal desc)) where rn=2;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are sequences

1100


Is sql the best database?

503


What is varchar used for?

540


Why functions are used in sql?

515


What is the process of debugging?

559






If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

3550


How to load data with sql*loader?

552


What is numeric function sql?

544


What is difference between pls_integer and integer?

523


State some properties of relational databases?

586


What is the execution plan in sql?

562


What are the differences between in and exists clause?

573


What is varchar data type in sql?

520


Which query operators in sql is used for pattern matching?

548


What are different types of functions in sql?

513