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

Answer Posted / arun kumar k s

drop table #temp select identity(int,1,1) as SlNo, * into
#temp from TABLE_NAME select top 3 * from #temp order by
SlNo desc

arun_4454@yahoo.co.in

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why it is recommended to avoid referencing a floating point column in the where clause?

715


How to create hyperlink from returned sql query ?

838


What do you understand by the denormalisation?

723


What is the difference between the 2 operating modes of database mirroring?

830


How sql server enhances scalability of the database system?

801


what is denormalization and when would you go for it? : Sql server database administration

911


if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration

734


What is rs.exe utility?

138


what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration

716


How do I view a trc file?

702


How to retrieve error messages using mssql_get_last_message()?

738


after migrating the dts packg to ssis by using migrtn wizrd in 2005. iam not able to open ssis pack and getting error. what r those errors? how to resolve?

1866


What is perspective, have you ever created perspective? : sql server analysis services, ssas

685


What is dbcc updateusage?

879


Explain what is use of dbcc commands?

722