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 the components of dbms?

535


What are character string data types in ms sql server?

639


How to create dbo table in sql server?

521


Introduction of rollup clause using sum and group by clause?

542


what are different types of backups available in sql server? : Sql server database administration

499






As per your opinion what are the five top responsibilities of a dba? : sql server database administration

614


List some of the rules that apply to creating and using a ‘view’

500


Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.

2035


what are user defined datatypes? : Sql server database administration

522


What is sql server programming?

557


What is application role in sql server database security? : sql server security

558


What are the types of sql server?

521


Does any body please help me what question's have asked for SSRS in the interview?

1675


What are indexers?

631


What command do we use to rename a database?

620