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

Does sap use sql?

997


Explain about various levels of constraint.

951


Can we insert delete data in view?

954


What is primary key and foreign key?

966


Differentiate between syntax and runtime errors.

1196


What is trigger explain it?

1020


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

1010


Does execute immediate commit?

1223


What is pls integer?

1050


Can instead of triggers be used to fire once for each statement on a view?

963


What are aggregate functions in sql?

1167


What are the advantages of sql?

1057


What is difference between stored procedure and trigger?

1176


What is the difference between a subquery and a join?

1115


Explain the purpose of %type and %rowtype data types?

935