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
What is varchar used for?
What are some predefined exceptions in pl/sql?
what is the use of friend function? : Sql dba
List out the acid properties and explain?
What is record type in pl sql?
what is sub-query? : Transact sql
How many row comparison operators are used while working with a subquery?
Explain ttitle and btitle.
Are views faster than queries?
What is structural independence and why is it important?
What is a recursive join sql?
Can we call dml statement in function?
What is a function in oracle pl sql?
What is the use of sqlerrd 3?
what is acid property in database? : Sql dba