how to find nth highest salary
Answer Posted / bala
-- to find third highest salary from emp table
select empname,empsal from emp a where 3 = (select count(*)
from emp b where a.empsal <= b.empsal);
| Is This Answer Correct ? | 6 Yes | 12 No |
Post New Answer View All Answers
What are drillthrough reports?
What is the difference between set and select?
how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A
What is temporary stored procedure?
What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.
Working with TLogs
what's sql server? : Sql server database administration
Does hive support indexing?
Why should one not prefix user stored procedures with ‘sp_’?
How to override dml statements with triggers?
What are the database roles? : sql server security
On a windows server 2003 active – passive failover cluster, how do you find the node which is active?
sql database suspect We have a sql database that is showing as suspect. How can we recover?
How to list all stored procedures in the current database using ms sql server?
What is @@rowcount in sql?