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

Answer Posted / balaji

select * from table_name ORDERBY id DESC limit 0,n;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What number sorts of privileges are accessible in sql?

666


Why use sub query in sql server and list out types of sub queries?

629


tell me what is blocking and how would you troubleshoot it? : Sql server database administration

566


What is the difference between a view and a stored procedure?

655


Can we insert data if clustered index is disabled?

603






What is the cartesian product of table?

631


What are the restrictions that views have to follow?

640


How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

773


Which data type columns are the best candidates for full-text indexing?

679


Explain the Ways to improve the performance of a sql azure database?

72


what is sql server? : Sql server database administration

605


Define primary key?

764


What are extended events in sql server?

597


What is the difference between getdate and sysdatetime?

631


What is dirty read?

709