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

Answer Posted / vijaykumar dolli

Select * From Sample Where
Srno In (Select Top 3 srno From Sample Order By 1 Desc)

-- Sample is a Table Name and Srno is Unique Key column
-- This is the perfect Answer ...!

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different type of Collation Sensitivity?

743


Do you know what are acid properties of transaction?

689


How each E-R model constructs can be mapped to the relational model?

722


What happens if you are trying to access a schema not owned by you?

716


What is the name of the Database which IBM mainframe uses?

738






How do I create a stored procedure in dbml?

687


How to view the error log for any specific instance? : sql server database administration

771


What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?

664


What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration

760


What is the difference between a fill factor of 100 and 0?

720


What is conditional split?

720


Which are the olap features?

740


What is a select query statement in ms sql server?

760


Why do we partition data?

789


What is ms sql server reporting services?

724