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
How to use user defined functions in expressions?
How can sql injection be stopped? : sql server security
Does index speed up select statements?
How to get a list of columns in a view using the "sp_columns" stored procedure?
Does server sql treat char as a variable-length or fixed-length column?
What options are available to audit login activity? : sql server security
What do you understand by the denormalisation?
If a table does not have a unique index, can a cursor be opened on it?
Explain about service Broker functions?
what is new philosophy for database devises for sql server 7.0? : Sql server database administration
What gets stored inside msdb database?
How to rename an existing column with the "sp_rename" stored procedure in ms sql server?
Explain cross join or cartesian product in sql?
What is a data source file?
Explain having clause?