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
What is provisioning, billing and metering, and connection routing concepts in the service layer?
What’s the distinction between dropping a info and taking a info offline?
Is the log file is a part of file group?
What is cube dimension? : sql server analysis services, ssas
What is sql server schema compare? How we can compare two database schemas?
What are different types of data sources?
Explain aggregate functions?
What are the mathematical functions supported by sql server 2005?
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
Explain what are the database objects? : SQL Server Architecture
Explain different types of self contained sub query?
You want to use a perspective in an mdx query. How do you select the perspective?
What is use of attributehierarchyenabled? : sql server analysis services, ssas
Explain about local stored procedure?
How many columns can we include on clustered index ?