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 / bobby

select * from table_name where <Primary key Column-
name> != all
(select top (@@rowcount-3) <Primary key Column-name> from
Table_name)

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the meaning of sql server?

1036


How you can get the list of largest tables in a database?

1062


Why do you need a sql server?

1170


How we can refresh the view?

1158


What are the advantages of sql stored procedure?

1121


Define Wed Edition in SQL Azure?

102


How to create a view on an existing table in ms sql server?

1192


Can you index views?

935


Explain activity monitors

1129


Explain different forms of normalization?

1001


Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?

128


What is a field name?

1017


how would you improve etl (extract, transform, load) throughput?

1074


How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?

1800


What is the chart in report?

165