how to find the second highest salary from emp table?
Answer Posted / manjusha
select * from emp e1
where 2=(select count(distinct salary) from emp e2
where e1.sal<e2.sal);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Define concurrency control. : Transact sql
What are the different ddl commands in sql?
Why do we create views in sql?
What is trigger and stored procedure in sql?
Is coalesce faster than isnull?
Is it mandatory for the primary key to be given a value when a new record is inserted?
how to use myisamchk to check or repair myisam tables? : Sql dba
What is the use of procedures?
how would concatenate strings in mysql? : Sql dba
What is error ora-01000: maximum open cursors exceeded
Difference between table function and pipelined function?
What is left inner join in sql?
How do I view tables in sql developer?
What is having clause in sql?
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..