Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are drillthrough reports?

161


What is the difference between set and select?

1163


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

1729


What is temporary stored procedure?

989


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.

2813


Working with TLogs

1898


what's sql server? : Sql server database administration

1053


Does hive support indexing?

1004


Why should one not prefix user stored procedures with ‘sp_’?

1100


How to override dml statements with triggers?

1277


What are the database roles? : sql server security

1279


On a windows server 2003 active – passive failover cluster, how do you find the node which is active?

1251


sql database suspect We have a sql database that is showing as suspect. How can we recover?

2004


How to list all stored procedures in the current database using ms sql server?

1196


What is @@rowcount in sql?

1058