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
Define left outer join in sql server joins?
Explain about link server in sql server?
When you should use a low fill factor?
Define Wed Edition in SQL Azure?
Explain how you can deploy an SSRS report?
Does a full backup include transaction log?
What happens if the update subquery returns no rows in ms sql server?
Explain trigger classes i.e. Instead of and after trigger?
How does using a separate hard drive for several database objects improves performance right away?
What is the beast way to write CTE in SQL Server ?
List out a number of the wants to setup a SQL Server failover cluster?
How many database files are there in sql server 2000?what are they?
What are the different types of locks in the database?
List the advantages of using stored procedures?
What is sqlcmd?