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...

find 2nd highest salary of person using cursor concept?

Answer Posted / jcreddy

select e1.salary from employee e1
where 1 = (select count(salary) from employee e2 where
e1.salary < e2.salary)
order by marks asc
-- by changeing from '<', to '>' you will get min salary

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain transaction server explicit transaction?

936


How to configure and test odbc dsn settings?

1160


What is the difference between system objects and user objects?

1166


What are the rendering extensions of ssrs?

157


Does transparent data encryption provide encryption when transmitting data across the network?

1051


What are different types of collation sensitivity?

989


What do you understand by physical_only option in dbcc checkdb?

981


what do you understand by change data capture?

1029


How much does sql server 2016 cost?

1076


Explain log shipping and mention its advantages.

1045


How to run sql server 2005 books online on your local system?

961


Is a primary key unique?

995


Explain sub-query?

959


Why do we use trigger?

975


What is compression - row-level and page-level compression?

920