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 is normalization and its types?

638


What is row_number()?

694


How to reaname table name without using sp_Rename in sql server..?

624


How to create nested stored procedure?

622


What are the 2 types of classifications of constraints in the sql server?

664






What is resource governor?

630


How can sql server instances be hidden? : sql server security

676


What is the difference between TRUNCATE and DROP?

711


It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio

649


How does clustered and non clustered index work?

602


How can I add Reporting Services reports to my application?

97


Define cursor locking

637


Can you name a few encryption mechanisms in sql server?

603


What is the difference RDBMS and Graph Database?

702


What are the different types of sql server replication? : sql server replication

711