what is syntex second or third highest salary.


thanks & Regards
Dhirendra sinha

Answer Posted / dipti saxena

select sal,rownum from (select sal from emp
order by sal desc)
where rownum<=3
MINUS
select sal,rownum from (select sal from emp
order by sal desc)
where rownum<=1

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between 2NF &3NF ?

843


How many joins in sql server?

687


What is ms sql server reporting services?

726


How will you know when statistics on a table are obsolete?

810


Does partitioning improve performance sql server?

648






What is CTE in SQL

706


What is precedence constraint?

717


Write the SQL query to drop, truncate and delete table.

726


How can we remove orphan records from a table?

723


What is the maximum number of instances in 32 bit and 64 bit sql server 2012?

738


What is isnull() operator?

779


If any stored procedure is encrypted, then can we see its definition in activity monitor?

728


What is candidate key with example?

709


What is #table in sql server?

743


Can I disable or restrict ssrs export formats (rendering formats)?

126