Skip to content Skip to sidebar Skip to footer

Sql Primary Key Exception

I have a Mircrosoft Sql Server database made up of about 8 tables that are all related that I am trying to update. To do this I create a number of temporary tables 'CREATE TABLE [v

Solution 1:

If your temp tables need that constraint

When create use

CONSTRAINT [PK_maintenance_event_id_temp"]

instead of

CONSTRAINT [PK_maintenance_event_id]

when you rename temp back to real table

exec sp_rename [PK_maintenance_event_id_temp], [PK_maintenance_event_id]

Post a Comment for "Sql Primary Key Exception"