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 / nitin kaushik

"select @@identity"
@@identity is used to get the current transaction value .

** 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 ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between statement and preparedstatement interface?

1000


Why edit is not possible in repeater?

953


What is ole in excel?

942


Define executenonquery?

918


What is the use of adodc?

992


Where is adodb dll located?

964


How to aggregating data across related tables?

1045


Define partial class?

978


What are the benefits of using of ADO.NET in .NET 4.0?

1075


What are the several execute methods of ado.net?

934


What is the difference between a datareader and a dataset?

1043


What is serialization and de-serialization in .net? How can we serialize the dataset object?

968


How is it possible to get 2 tables of data at a time by using data reader?

955


What are the features of ado.net?

1040


What is the role of the dataset object in ado.net?

1111