adspace


Write a query to find five highest salaries from EMP table.
(there is a column SALARY)

Answer Posted / kavitha nedigunta

select a.*
from(select empno,ename,sal
from emp
order by sal desc nulls last)a
where rownum <6
order by sal desc

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is inner join faster than left join?

1289


what are the advantages of sql ? : Sql dba

1154


how many tables will create when we create table, what are they? : Sql dba

1157


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2102


Can we rollback truncate?

1086


What is the current version of postgresql?

1189


what is sql server agent? : Sql dba

1191


how to escape special characters in sql statements? : Sql dba

1125


define sql insert statement ? : Sql dba

1110


how to use regular expression in pattern match conditions? : Sql dba

1125


Can we use distinct and group by together?

1148


what is collation? : Sql dba

1242


How do I remove duplicates in two columns?

1203


Does group by remove duplicates?

1122


What is the current version of sql?

1106