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 are the drawbacks of using ado.net?

967


Explain the differences between oledb sql server, oledbdotnet provider?

999


What is linq and entity framework?

996


How does ado.net work?

914


How do you implement locking concept for dataset?

991


What does ado stand for?

902


What is the full form of ado.net?

979


What are the namespaces used in ADO.Net to connect to a database?

1202


Explain the difference in record set and dataset?

931


What are the major challenges in accessing data from a database?

1015


how can implement dropdownlist in particular of dataset when try to update?

2774


What is the difference between executequery and executenonquery?

902


Define atomicity?

1016


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

962


What are the different methods by which we can populate a dataset?

1227