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 is the sql server 2000 version number?

553


What is a dataset and what are the different types of datasets?

93


How do I view a script in sql server?

540


Can you import Microsoft Excel data to SSRS?

89


What is the difference between upgrade and migration in sql server?

598






What is tablesample?

578


What is 1nf 2nf?

556


What are the differences between stored procedure and the dynamic sql?

587


Can you tell me some of the common replication dmv's and their use? : sql server replication

537


What happens when transaction log is full?

515


How do you start single user mode in clustered installations?

525


Explain the properties of sub-query in sql server?

514


What is filter index?

519


What is sql language?

555


What are the various editions of sql server 2017 that are available in the market?

507