how to find the second highest salary from emp table?
Answer Posted / priya
select sal from emp where sal <(select max(sal) from emo)
and rownum<2 order by desc
though rownum which is a pseudo column can be used for
comparisions with relational operators like > or < ,>=, <=
but equalto = may not work in most of the cases..
similarly rowid also.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain the order of sql statement execution?
what is an index? : Sql dba
What is group function in sql?
what are the nonstandard string types? : Sql dba
Which join condition can be specified using on clause?
What does stand for in sql?
What are pl sql data types?
Explain scalar functions in sql?
What is the difference between syntax error and runtime error?
How can you save or place your msg in a table?
What are the uses of merge?
What is the difference between left and left outer join?
Why is partition used in sql?
What is spool?
Can we insert data into materialized view?