how to find the second highest salary from emp table?
Answer Posted / gourvendra singh
Please put the below query, u will get the second highest
salary of the table :---
select sal from(select sal from
(select distinct sal from emp order by sal desc)
where rownum<=2 order by sal asc)
where rownum=1;
| Is This Answer Correct ? | 488 Yes | 264 No |
Post New Answer View All Answers
Which normal form is best?
What is the maximum rows in csv?
What are the advantages of pl sql over sql?
how to delete an existing column in a table? : Sql dba
What are instead of triggers?
What is the difference between drop and truncate commands?
Why is theta join required?
Is coalesce faster than isnull?
what is “go” in t-sql? : Transact sql
What is autocommit sql?
Can pl sql procedure have a return statement?
how does a local variable is defined using t-sql? : Transact sql
What is data profiling in sql?
Advantages and disadvantages of stored procedure?
what is a primary key? : Sql dba