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

Define left outer join in sql server joins?

970


Explain about link server in sql server?

1062


When you should use a low fill factor?

996


Define Wed Edition in SQL Azure?

100


Explain how you can deploy an SSRS report?

151


Does a full backup include transaction log?

981


What happens if the update subquery returns no rows in ms sql server?

1125


Explain trigger classes i.e. Instead of and after trigger?

883


How does using a separate hard drive for several database objects improves performance right away?

937


What is the beast way to write CTE in SQL Server ?

1052


List out a number of the wants to setup a SQL Server failover cluster?

1075


How many database files are there in sql server 2000?what are they?

1055


What are the different types of locks in the database?

925


List the advantages of using stored procedures?

1060


What is sqlcmd?

1062