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
Which architecture does Datasets follow?
Which is faster ado.net or linq?
How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?
What are the namespaces used in ado.net for data access?
What is a data control clerk?
What is untyped dataset?
How can we add/remove row's in "datatable" object of "dataset"?
Define executenonquery?
Can we load multiple tables in a dataset?
What is isolation?
What is namespace in ado.net?
What is adodb dll?
What is two way data binding android?
What is difference between entity framework and ado.net?
What are ado.net objects?