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

How will you hide an attribute? : sql server analysis services, ssas

956


what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

940


What is a schema in ms sql server 2005?

967


Explain about merge replications?

1018


What is open database communication (odbc)?

1062


What is the security model used in sql server 2005?

1004


Why we need to use secondry database file? though, we can do same work using primary database file also.

6881


Explain datetime2 data type in sal server 2008?

906


Explain about temporary stored procedure?

1016


Other than truncate statement, which other command can by-pass the trigger on the tables?

1134


Tell me the use of keyword with encryption. Create a store procedure with encryption?

1005


What is service broker? : sql server database administration

992


What is Extended user-defined?

957


What is snapshot parameter in ssrs?

150


How can I change procedure name in sql server?

1048