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

Can foreign key be duplicate?

1063


What is difference between line feed ( ) and carriage return ( )?

908


after migrating the dts packg to ssis by using migrtn wizrd in 2005. iam not able to open ssis pack and getting error. what r those errors? how to resolve?

2093


What is the purpose of linked server configuration in sql server?

1048


Does full backup break log chain?

963


Explain ms sql server reporting services vs crystal reports?

919


What is set nocount on and what is set nocount off?

934


What have included columns when we talk about sql server indexing?

1037


what is the difference between Delete and Truncate command in SQL

1148


You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?

2147


Explain trigger and trigger types?

987


How to include date and time values in sql statements?

1086


What type of Index will get created after executing the above statement?

1100


What is rtm version in sql server?

1055


What is indexing in sql server with example?

1004