部分代码如下--删除外键约束DECLAREc1cursorforselect'altertable['+object_name(parent_obj)+']dropconstraint['+name+'];'fromsysobjectswherextype='F'openc1declare@c1varchar(8000)fetchnextfromc1into@c1while(@@fetch_status=0)beginexec(@c1&