How to get rid of generated constraints?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MHerve
    New Member
    • Mar 2012
    • 1

    #1

    How to get rid of generated constraints?

    Hi there,

    Talking SQLServer 2008.
    In a small script I'm trying to drop a column which a bigint but it refuse because of a generated constraint, which is the default (0) value of that column.

    The problem is that as this constraint is not mine, it has a name which vary from db instance to another one. It is called DF__intervent_m ax_d__676664ED2 but has another end number in another database.

    I tried:

    EXEC sp_unbindefault '[table].[column]' but it doesn't like it

    Any idea how I could remove that constraint in my script?

    Thanks.
Working...