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 / pawan

select * from emp a where 2=(select count(distinct(sal)) from emp b where a.sal<=b.sal);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you run a trace?

946


What are the different Authentication modes in SQL Server and how can you change authentication mode?

1126


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

1125


In what version of sql server were synonyms released?

1000


What is abstracting periodical?

991


What is the maximum size per database for sql server express?

1103


Why variables called the most powerful component of ssis?

1123


What are the different types of locks in the database?

973


What is a user-defined function in the sql server and what is its advantage?

1141


What are the restrictions while creating batches in sql server?

1114


What is the difference between delete and truncate statements?

1127


Do you know what are acid properties of transaction?

1005


Write a SQL query in order to merge two different columns into single column?

1086


Can we write ddl in trigger?

969


Detail about the hardware which is supported by SQL server?

1118