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

what is union? : Sql dba

1033


Why procedure is used in sql?

1042


How many times can we commit in a loop?

1026


what is a constraint? Tell me about its various levels. : Sql dba

993


How is indexing done in search engines?

982


What is partition in sql query?

1004


How can I change database name in sql?

1088


Why join is faster than subquery?

1118


What are the different types of dbmss?

1015


what is single byte over head in oracle..?

2407


Does oracle roll back the transaction on an error?

1022


If a cursor is open, how can we find in a pl/sql block?

1168


What are literals in sql server?

1178


which operator is used in query for pattern matching? : Sql dba

1010


What is varchar example?

1039