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 are the exceptions handled in sql server programming?
How to maintain a fill factor in existing indexes?
How do I find the default sql server instance?
What is difference between stored procedure and user defined function?
Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60
Explain the cursor lock types?
How to change the name of a database user?
Which are the third-party tools used in sql server and why would you use them?
What is the function of sql server agent windows service?
What is the report builder?
How many categories of functions based their return modes?
What does the on delete cascade option do?
what is a self join? : Sql server database administration
Do you know the isolation level that sql server support?
What is table-valued sub query?