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 the query for find the top 2 highest salary in sql
server

Answer Posted / neeraj sharma

select ename,sal from emp where rownum<=3 order by sal desc

Note:- every table has rownum column but it is hidden by
default you can see it by this
select rownum from your_table_name

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to change the name of a database user?

961


How to create and drop temp table in sql server?

1058


What are the extra roles available in msdb? : sql server security

1136


What’s the use of custom fields in report?

944


1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?

2080


How many ways to create table-valued functions?

992


explain different levels of normalization? : Sql server database administration

1010


What is the stuff?

1007


what is the difference between count(*) and count(1) ?

1086


Can a table be moved to different filegroup?

977


Explain about system stored procedure?

1036


How to write a query with a left outer join in ms sql server?

985


How to include date and time values in sql statements?

1090


How to find related tables in sql server?

948


Explain the first normal form(1nf)?

1030