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
Define primary key?
What are the common performance issues in sql server?
What is dbcc?
What is the largest component inside a field?
How do I change my passwords (database, LDAP, and so on) without causing an outage?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
What is the use of “join” in sql server?
How to convert binary strings into integers in ms sql server?
What is sub-query in sql server?
Is the log file is a part of file group?
What is the use of partition by in sql server?
What is the difference between deallocate cursor and close cursor?
What are the basic features of a trigger in ms sql server?
How to edit table in sql server 2017?
What are the different subsets of sql?