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

what is syntex second or third highest salary.


thanks & Regards
Dhirendra sinha

Answer Posted / veeresh kethari

with Topsal (EmpID,Ename,Sal,Dno,Topsal) as
(select *,row_number() over(order by sal) Topsal from emp)
select top 2 EmpID,Ename,Sal,Dno from Topsal order by sal desc

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 a trigger and types of a trigger?

986


What is the difference between an index and a unique index?

1008


Can we do dml on views?

972


How to find which stored procedure is currently running in sql server?

1002


What is snapshot parameter in ssrs?

155


What are the types of joins in sql?

1134


What is the native system stored procedure to execute a command against all databases?

1038


What is @@error in sql?

1073


How to create a trigger for insert only?

1048


what are the different stages of Report Processing?

137


What is merge?

1026


Does union all remove duplicates?

1076


Do I need a report server to run reports in my application?

168


What is the command used to recompile the stored procedure at run time?

1085


What is the query and subquery?

1087