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

Answer Posted / priya

select top 3 from <table name > where < specify any
condition> order by <column ID> desc

Is This Answer Correct ?    15 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a view with data from multiple tables?

561


What is an active database?

600


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

627


Who is the owner of a schema in ms sql server?

548


What is the difference between a clustered index and a non-clustered index?

536






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 is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration

542


What is the use of RDBMS?

591


What are the recovery models in sql server 2000?

568


What is difference between table aliases and column aliases? Do they affect performance?

510


What is the use of “join” in sql server?

574


How to update values in a table with update statements in ms sql server?

558


Do you know nested transaction?

516


How to provide values to stored procedure parameters in ms sql server?

537


How to delete multiple rows with one delete statement in ms sql server?

520