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

Answer Posted / krishna sandeep

select top 3 <column_name> from ,table_name> order by
<column_name> desc

this will work.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of forms?

468


How do I determine how many instances of sql server are installed on a computer?

507


Explain system scalar functions?

557


How do I start sql server agent automatically?

486


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

501






What happens when converting big values to integers?

542


What is sql server transaction log file?

495


How do I manually uninstall an instance of sql server 2016?

522


Define self join?

605


How to delete an existing row with delete statements in ms sql server?

523


What are the mathematical functions supported by sql server 2005?

516


What is difference between global temporary tables and local temporary tables?

622


What the difference between UNION and UNIONALL?

547


Can I save my report as html, excel or word? : sql server management studio

522


What command is used to delete a table from the database in the sql server and how?

517