wat will be the sql query to extract only last 3 records
from table supose table hving thousands for records
Answer Posted / amit kaishver
Select * from ( select rownum k,g.* from nbfc_bank_m g) h,
(select max(rownum) a,max(rownum)-1 b,max(rownum)-2 c
from nbfc_bank_m ) p
where h.k in (p.a,p.b,p.c)
Is This Answer Correct ? | 5 Yes | 6 No |
Post New Answer View All Answers
What is filter index?
What are the 3 types of schema?
Determine how to use the inserted and deleted pseudo tables?
What does COMMIT command do?
How can I create a new template for import ? : sql server management studio
Where is localdb stored?
What is the difference between ‘having’ clause and a ‘where’ clause?
What are the types of indexes?
Can group by be used without aggregate functions?
How can a database be repaired?
Explain transaction server consistency?
If user is owning any SQL Objects, can we drop that user
Explain what are the database objects? : SQL Server Architecture
Write a SQL query to delete a table?
What is openxml in sql server?