SQL Server 2012 for a database management class. Identity_insert isn't working. I can see it set properly in the config, but isn't resetting the generated value to 1, like I need it. Looked online and found a query, but obviously there are some problems with it. The database is HandsOnOne, the table is Address, and the column - which is also a primary key is AddressID. How do I get this to work?
SET IDENTITY_INSERT [HandsOnOne].[Address].[AddressID] ON
INSERT INTO [HandsOnOne].[Address].(AddressID)
SELECT (AddressID)
FROM [HandsOnOne].[Address].
SET IDENTITY_INSERT [HandsOnOne].[Address] OFF