Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the types of subscriptions in SQL Server replication?

1014


What are the different types of stored procedures?

1099


What is the difference between coalesce() & isnull()?

1103


Are connections to sql server encrypted?

987


Difference between 2NF &3NF ?

1070


How to make a column nullable?

1092


What are the disadvantages of primary key and foreign key in SQL?

1090


Define the one-to-one relationship while designing tables.

885


what is a check constraint?

1074


Is ssrs support other database except ms sql server?

139


How does normalization work?

902


How to provide values to user defined function parameters?

998


What is the default value of an integer data type in sql server 2005?

941


Using the customer, and order table in northwind database, please write a query to produce xml?

1053


What is raid? : SQL Server Architecture

1151