|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, April 12, 2013 11:22 AM
Points: 312,
Visits: 386
|
|
HELP!! I have a deployment script that is building tables and setting default values to a column. I have built into it if exists, so that it can be rerunnable. The default constraints are system named when created I guess because they are funky names. So on the rerun, they are not being dropped due to the fact that I don't know those funky names. How do I drop the DFs when I don't know their names? Thank you in advance!
Thank you!!,
Angelindiego
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 8:46 PM
Points: 24,
Visits: 136
|
|
This should get you started. If you want to know the column to script it out you can use the parent_column_id and join to sys.columns.
SELECT OBJECT_NAME(parent_object_id) AS TableName, name AS DefaultName,* FROM sys.default_constraints
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, April 12, 2013 11:22 AM
Points: 312,
Visits: 386
|
|
Thank you Randy!!!!! Especially for your SPEEDY reply!!
Thank you!!,
Angelindiego
|
|
|
|