Sql server 2012 for a database management


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

Solution Preview :

Prepared by a verified Expert
Business Management: Sql server 2012 for a database management
Reference No:- TGS02138721

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)