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

What is sql*plus?

1122


What is the purpose of the sql select top clause?

1206


How do I start sql profiler?

1048


What are the different types of dbmss?

1054


Are stored procedures faster than queries?

990


Write an sql query to select all records from the table?

1079


What is function and procedure in pl sql?

1119


Can function return multiple values in sql?

1098


how to convert character strings to dates? : Sql dba

1098


How many postgresql users are there, worldwide?

1129


Can we use the cursor's to create the collection in PL/SQL?

1092


What can you do with pl sql?

1143


What does the argument [or replace] do?

1127


What is an alias command?

1119


Is join and inner join the same?

1044