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 normalization 1nf 2nf 3nf?
what are database files and filegroups? : Sql server database administration
Explain few examples of RDBMS?
How do we synchronize On-Premise SQL server with SQL Azure?
when you create a database how is it stored? : Sql server database administration
What is Federation Root Database?
What are sp_configure commands and set commands?
We are updating a field in sql and alter the row also.after giving the commit command the system is crashed.what will happen to the commands given,whether it will update and alter the table or not?
why would you use sql agent? : Sql server database administration
Where are SQL server users names and passwords are stored in sql server?
How to get a list of table columns using the "sp_columns" stored procedure in ms sql server?
what is the system function to get the current user's user id? : Sql server database administration
What is the command used to check locks in microsoft sql server?
Explain the concept of recursive stored procedure.
What are types of storage modes? : sql server analysis services, ssas