Wednesday, May 11, 2022

SQL Server Scope Identity

 USE AdventureWorks2012;

GO INSERT INTO Person.ContactType ([Name]) VALUES ('Assistant to the Manager'); GO SELECT SCOPE_IDENTITY() AS [SCOPE_IDENTITY]; GO SELECT @@IDENTITY AS [@@IDENTITY]; GO

No comments:

Post a Comment