1

I asked this question How to use insert and select simultaneously?

This question clearly asks for getting the id value after a row is inserted and it was closed for duplicate of this question How to extract the last inserted row in SQL Server?

which says When an insert statement is executed one or more rows is inserted into the table, is there any way to extract the last inserted row in SQL Server?

Can anybody please tell me is this really a duplicate?

4

Yes it's a duplicate.

This question clearly asks for getting the id value after a row is inserted

The two main methods for doing this are using SCOPE_IDENTITY and the OUTPUT clause, both of which are described in the accepted answer.

Being closed as a duplicate just means the essence of your question has been asked and answered before.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .