wat will be the sql query to extract only last 3 records
from table supose table hving thousands for records
Answer Posted / pawan k. dubey
1-select * from employee where emp_id >(select count(*)-3
from employee)
2-select * from employee where emp_id in
(
select top 3 emp_id from employee order by emp_id DESC
)
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
Working with TLogs
What are the different types of replication are there in sql server 2000?
What is the difference between functions and scalar functions?
Explain the categories of stored procedure?
Explain the various types of concurrency problem?
When we should use @@error?
What is key attribute?
Does index slows down insert statements?
What is default constraint?
Detail about query optimizer?
What is a database table?
What is primary key and example?
Write a query for primary key constraint with identity key word?
How to filter out duplications in the returning rows in ms sql server?
You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?