Missing Primary key

  • 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

  • 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

  • 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