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 retrieve a second highest salary from a table?
Note:Suppose salaries are in duplicate values
eg:
Name Sal
Malli 60000
Pandi 60000
Rudra 45000
Ravi 45000

Answer Posted / rajat

SELECT * FROM (
SELECT RANK()OVER( ORDER BY SALARY DESC) NUM, A.* FROM RAJ A)
WHERE NUM=2;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how many triggers are allowed in mysql table? : Sql dba

1061


Is full outer join same as cross join?

964


What is the use of pl/sql table?

1062


Write the alter statement to enable all the triggers on the t.students table.

1123


Which table is left in join?

975


what is a composite key ? : Sql dba

1045


What are sql injection vulnerabilities?

981


What schema means?

886


What is nested table in pl sql?

1066


What is the sql*loader? : aql loader

1050


what is the difference between cluster and non cluster index? : Sql dba

1023


What are crud methods?

1025


Can we use rowid as primary key?

984


What is an alias command?

1062


Explain the savepoint statement.

1090