Which should i use to get last inserted record id in sql server 2005?
I searched stackoverflow and i found this,
SQL: How to get the id of values I just INSERTed?
Comment of the best answer:
there are known bugs with SCOPE_IDENTITY() in sql server 2005, not sure about 2008, the OUTPUT clause can return a set of IDs if necessary...
Select SCOPE_IDENTITY() as Id from Table
I am uisng sql server 2005... Any suggestion