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...

Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / tejasvita dhuri

select id,salary from (select id,salary,ROW_NUMBER()over (order by salary desc) as rowcol from emp)A
where A.rowcol=2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I pipe the output of one isql to another?

1000


Why coalesce is used in sql?

1004


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

1057


What is a column in a table?

1118


What is field delimiter?

1042


What is java sql driver?

1110


Is it possible to include an insert statement on the same table to which the trigger is assigned?

1011


Can we use distinct and group by together?

1051


What do you mean by “trigger” in sql?

1069


What found sql?

940


What is spool?

1050


What is primary key and foreign key with example?

926


Does user triggers have entry for trigger with compilation errors?

1032


How do you write a subquery?

1023


How many subqueries can be nested in a statement?

980