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

Answer Posted / skumar

We can use the query like
SELECT TOP 1 ID FROM table ORDER BY ID DESC

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is DataReader Object?

590


How to aggregating data across related tables?

547


What are the core objects of ADO.NET?

582


What is the difference between Command and CommandBuilder object?

585


How to find the given query is optimised one or not?

502






What is ado.net in mvc?

496


What is shadow copy?

571


What is difference between sqldatareader and sqldataadapter?

480


What is difference between connected and disconnected architecture in ado.net?

578


What are the parameters that control most of connection pooling behaviors?

508


What are the steps to connect to a database?

543


How can you identify whether or not any changes are made to the DataSet object since it was last loaded?

552


What is the hierarchy of data in databases?

497


What are the parameters that control most of connection pooling behaviours?

567


How can we load multiple tables in a dataset?

533