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

wat will be the sql query to extract only last 3 records
from table supose table hving thousands for records

Answer Posted / teja

select * from employee where emp_id in
(select top 3 emp_id from employee order by emp_id DESC)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration

886


Can you index views?

886


How to connect a database with sql express.?

1044


How to add more data to the testing table in ms sql server?

1058


What is mapping schema?

1010


What is sql server 2000 work load governor?

1035


Which tcp/ip port does the sql server run on? How can it be changed?

1032


what is dbcc? : Sql server database administration

1010


What are the general features of sql server management studio? : sql server management studio

1057


How many cores do I need for sql server 2016?

873


State the difference between local and global temporary tables?

1092


Can you explain different types of locks in sql server?

936


Why truncate is ddl command?

1039


What are the main differences between #temp tables and @table variables and which one is preferred?

1062


Explain how dts is used to extract, transform and consolidate data?

977