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 executequery and executenonquery?

972


Which is faster datareader or dataadapter?

1044


What is data relation in ado.net?

1137


What are the differences between OLEDB and SQLClient Providers?

1243


What is ado or jdbc?

979


List all the steps in order, to access a database through ado.net?

1126


Which is the best method to get two values from the database?

1013


What is difference in record set and dataset?

1155


What is difference between entity framework and ado.net?

980


Why is ADO.NET serialization slower than ADO ?

1101


What property must be set and what method must be called in your code to bind the data from some data source to the Repeater control?

1064


Explain advantages of ado.net?

1097


What is acid in ado.net?

1105


What is ado.net and its features?

1030


how Sequence to connect and retrieve data from database using dataset?

1355