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 find the second highest salary from emp table?

Answer Posted / rajkishore bagwan

simplest method ----
select salary
from employees
order by salary desc
offset n-1 rows fetch next 1 rows only
(replace n with any number it will give you the nth highest salary)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is latest version of sql?

1044


Can we write ddl statements in functions?

1116


What are some predefined exceptions in pl/sql?

1167


What is join view in sql?

944


How can you tell the difference between an index and a view?

937


What do you understand by case manipulation functions?

1034


how to concatenate two character strings? : Sql dba

1101


What is anonymous block in sql?

1120


Are subqueries better than joins?

976


What is dml statement?

955


How does sql store data?

917


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

1134


What is trigger in pl sql?

1001


How many joins in sql?

1011


Can two tables have same primary key?

976