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 / prativa mishra

select *
from
(select salary,dense_rank() over (order by salary) kk from table_name)
where kk=2

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does cross join work?

947


Can ddl statements be used in pl/sql?

1139


What is sql engine in oracle?

986


Explain the savepoint statement.

1090


What are hotfixes and patches?

944


What is attribute indicator in pl sql?

1011


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

1031


What is rownum in sql?

1040


Explain isolation levels. : Transact sql

1068


How do you update a table in sql?

984


What is %rowtype in pl sql?

987


What is ttitle and btitle?

1061


Is pl sql better than sql?

1025


How to display the records between two range in Oracle SQL Plus?

1143


What are the benefits of pl sql?

1115