how to find the second highest salary from emp table?

Answer Posted / debasish

select ename,sal from (select ename,sal,row_number()
over(order by sal desc)rn from emp)
where rn=1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between union and union all command?

556


What does trigger mean in psychology?

539


What do you mean by table in sql?

527


What is sharding in sql?

566


What is nvl?

617






Why are indexes and views important to an organization?

529


Why left join is used in sql?

522


What are sql functions? Describe the different types of sql functions?

563


What is the purpose of using pl/sql?

667


What is information schema in sql?

584


What are all the ddl commands?

635


What is java sql package?

543


What is the maximum number of columns in sql table?

551


What is assignment operator in pl sql?

572


What is implicit cursor in pl sql?

544