how to find the second highest salary from emp table?
Answer Posted / rahul thakur
select top 1 salary from emp where id not in (select top1 id from emp order by salary desc)order by salary desc.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I view stored procedures?
What is the difference between database trigger and stored procedure?
what are date and time intervals? : Sql dba
Does truncate remove indexes?
What is meant by user defined function?
How can you select unique records from a table?
Is json a nosql?
How do I write a cron which will run a sql query and mail the results to agroup?
what is view? : Sql dba
What is the difference between inner join and left join?
What is the difference between inner join and outer join?
What are the uses of merge?
what is a primary key? : Sql dba
What are the most important ddl statements in sql?
What is cost in sql execution plan?