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 scheduled job and how to create it?

542


what is a check constraint?

626


What do you mean by data manipulation language?

581


What is simple indexing method?

566


What do you understand by replication in sql server? Mention the different types of replication in sql server.

494






How do I know if localdb is running?

502


What is named calculation? : sql server analysis services, ssas

520


What are the operating modes in which database mirroring runs?

597


What are the differences between stored procedure and view in sql server?

614


What is primary key and example?

496


What is checkpoint in sql server?

607


How many types of triggers in sql server?

513


You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?

643


Differentiate between sql temp table vs table variable?

505


Explain mixed authentication mode of sql server?

537