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...

How to fetch the last inserted record in a particular table?

Answer Posted / raji22559

CommanObject.CommandText="Select @@Identity";

** Note: Over a given connection if any insert statement is
executed on a table with identity column , the back end
sql-server for the connection initializes a parameter by
name "@@Identity" with the value of Identity column for the
last inserted record.

Is This Answer Correct ?    18 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is entity framework better than ado.net?

1017


What is ado and rdo?

901


How do you find the count of records in a dataset?

978


differences between ADO and ADO.NET

1077


The answers which posted above is not satisfied my requirement? Can some one post teh exact answer? Thanx

2029


What is ado.net tutorial?

946


Which property is used to check whether a DataReader is closed or opened?

1049


How to connect and retrieve data from database using dataset

1055


What is adodb dll?

1002


What is ado.net and its features?

979


How to Read, Add, Update and Delete record in Entity Framework ?

1040


What is difference between executequery and executeupdate?

1007


Define connection string?

1069


What are dcl commands?

1009


What is ado data control?

1001