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 shutdown mysql server? : Sql dba

1084


what is the difference between a local and a global temporary table? : Sql dba

1052


What operators deal with null?

1090


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1249


What is the benefit of foreign key?

1010


What are local and global Indexes and where they are useful.

1433


What is set serveroutput on in pl sql?

1273


What programs use sql?

984


What is lexical units in pl sql?

1124


What are the different operators available in sql?

987


How to use sql*plus built-in timers?

1173


what is a control file ? : Sql dba

1022


What are different types of sql commands?

1097


Can we alter stored procedure?

971


what are the differences between binary and varbinary? : Sql dba

1025