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

Explain how to use transactions efficiently : transact sql

923


In a distributed database system, can we execute two queries simultaneously?

992


what are the authentication modes in sql server? How can it be changed? : Sql dba

1320


What are views in sql?

926


How many types of normalization are there?

895


How do I run a sql query?

968


What is pivot in sql?

871


What is trigger in sql? Explain

941


Can %notfound return null after a fetch?

999


Can we use pl sql in mysql?

960


What is trigger in pl sql?

955


What is scalar and vector?

936


What is partition in sql query?

947


How do I view stored procedures?

916


Which join condition can be specified using on clause?

899