var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: rename column with check constraints
I want to change the name of a column. I tried to use sp_rename but i get the message:
"Object 'table2.TelNoMob' cannot be renamed because the object participates in enforced dependencies."
I think this is because the specific column has check constraint.
Is there a way of changing the column's name?
You will have to drop the constraint and add it it again afterwards.
This will give you the constraint name to drop
select object_name(constid) from sysconstraints where id = object_id('tblname')
and colid = (select colid from syscolumns where id = object_id('tblname') and name = 'colname')