SQL Server 数据表给现有字段添加默认值或修改默认值

时间:2021-03-12 14:40:49   收藏:0   阅读:0

USE TEST
GO

--紧急联系人
--删除原有约束
--ALTER TABLE test  drop constraint DF_TEST_JJLXR
--添加约束
ALTER TABLE test add constraint DF_TEST_JJLXR DEFAULT ‘‘ for JJLXR

--紧急联系人电话
--删除原有约束
--ALTER TABLE test  drop constraint DF_TEST_JJLXDH
--添加约束
ALTER TABLE test add constraint DF_TEST_JJLXDH DEFAULT ‘‘ for JJLXDH

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!