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

select sal from emp order by sal desc offset 1 rows fetch next 1 rows with ties;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to sort the rows in sql.

1008


What is the difference between a primary key and a unique key?

998


What are the most important characteristics of pl/sql?

1079


What is the use of function in sql?

1028


Can we use update in sql function?

1006


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

992


Can we rollback delete command?

934


Explain what is a column in a table?

1041


What are the different types of functions in sql?

996


Explain locks? : Transact sql

951


what is a unique key ? : Sql dba

1025


What is parameter substitution in sql?

976


what is the difference between truncate and drop statements? : Sql dba

1033


Explain dml and ddl?

921


What is pivot in sql?

871