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
Why do we need different type of parameter?
What is the use of builtinadministrators group in sql server? : sql server security
Why truncate is ddl?
What is 5nf in normalization form?
Can you explain powershell included in sql server 2008?
What is the data type of time?
Tell me about builtinadministrator?
Can we use max in where clause?
you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration
Can a stored procedure call itself or recursive stored procedure? How many levels sp nesting is possible?
What is query optimizer in sql server?
What does indexation mean?
Define primary key?
How to loop through the result set with @@fetch_status?
What is field in algebra?