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

Answer Posted / grace

SELECT TOP 3 * FROM <TABLE_NAME> WHERE <CONDITION> ORDER BY
<COLUMN_NAME> DESC

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the first normal form(1nf)?

562


Does sql server use java?

523


What does Master database contains?

631


What are different types of database indexes?

535


Explain primary key and foreign key constraints?

527






How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?

588


What is the difference between for trigger and after trigger?

547


What the difference between UNION and UNIONALL?

576


How to create a simple stored procedure in ms sql server?

523


explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

509


How to modify the underlying query of an existing view?

541


You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?

644


What does it mean to invest in the index?

512


What are the different types of indexes?

612


What is the difference between osql and query analyzer?

546