Quote:
"Cannot insert explicit value for identity column in table 'table name' when IDENTITY_INSERT is set to OFF."
straight forward issue.
Id
is an
identity
column, you cannot explicity insert identity value to the table directly,
You will have to set the
IDENTITY_INSERT
to
ON
to insert the id value.
SET IDENTITY_INSERT Workouts ON
-- insert the data
INSERT INTO Workouts (Id, Name, Description) VALUES (1, 'HIIT', 'High-Intensity Interval Training')
SET IDENTITY_INSERT Workouts OFF