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 are the types of subscriptions in SQL Server replication?
What are the different types of stored procedures?
What is the difference between coalesce() & isnull()?
Are connections to sql server encrypted?
Difference between 2NF &3NF ?
How to make a column nullable?
What are the disadvantages of primary key and foreign key in SQL?
Define the one-to-one relationship while designing tables.
what is a check constraint?
Is ssrs support other database except ms sql server?
How does normalization work?
How to provide values to user defined function parameters?
What is the default value of an integer data type in sql server 2005?
Using the customer, and order table in northwind database, please write a query to produce xml?
What is raid? : SQL Server Architecture