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

Answer Posted / kumar

select top 3 * from tablename
order by 1 desc

By
Kumar Junior Software Engineer

Is This Answer Correct ?    13 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain databases and sql server databases architecture? : Sql server database administration

699


What are joins in sql and what are the different types of joins?

712


Describe in brief sql server monitoring ways.

753


What are drillthrough reports?

128


What is attribute relationships, why we need it? : sql server analysis services, ssas

673






Explain table valued parameters in sql server? Why tvp used?

728


What is the stuff?

711


What is difference between line feed ( ) and carriage return ( )?

681


What is the use of tempdb? What values does it hold?

742


What is the Disadvantage of indexed sequential file.

782


what is a correlated sub-query? : Sql server database administration

675


What are cursors stored procedures and triggers?

682


How many types of stored procedures are there in sql server?

730


Does sql server use t sql?

724


What methods do you follow to protect from sql injection attack?

702