November 16, 2007 at 6:48 am
We have a situation where a primary key on a table went missing. Has anyone come across this situation before?
We went through all our deployment documents and could not find any related script relating to dropping the primary key.
Thanks in advance
IC
November 16, 2007 at 7:54 am
Not unless someone dropped it (and in those cases it was unintentional such as they were in Enterprise Manager and accidentally deleted a column).
K. Brian Kelley
@kbriankelley
November 17, 2007 at 1:10 am
Hi,
or I think at any moment the constraint related to the primary key, has been disabled and an update has been done, then PK constraint has been enabled .
-- Disable a constraint
ALTER TABLE Foo NOCHECK CONSTRAINT pk_Fooconstraint
--Update done
-- enable the check_sale constraint in the employee table
ALTER TABLE Foo CHECK CONSTRAINT pk_Fooconstraint
Regards,
Ahmed
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply