DROP a culumn with constraint

  • The culumn from_core was created by a program that execute this code:

    ALTER TABLE WebRsLog ADD [from_core][bit] NOT NULL DEFAULT 1

    Now I need to drop this column. Using the code:

    ALTER TABLE WebRsLog DROP COLUMN [from_core]

    I get the error:

    The object 'DF__WebRsLog__from_c__7C86175C' is dependent on column 'from_core'.

    So, I need to drop the constraint first. A problem - the name of the constraint was created automaticly and is not known. Tried looking into the system tables without success. How can I find the constraint name or id when the only known data is the table name and the column name.

    Avron Tal

  • Messages have been posted to http://qa.sqlservercentral.com/forums/shwmessage.aspx?forumid=9&messageid=140996



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply