.NET/MS-SQL
SQL Server - Return value after INSERT
네코냥이
2013. 12. 30. 14:59
No need for a separate SELECT...
INSERT INTO table (name)
OUTPUT Inserted.ID
VALUES('bob');
This works for non-IDENTITY columns (such as GUIDs) too
SQL Server - Return value after INSERT - Stack Overflow.pdf