1.先在对应的表中添加必填(非空)字段,以及设置该字段的默认值

2.删除该字段的默认值设置约束

3.根据该表中已有的数据要求修改该字段的值

ALTER TABLE WH_StoreInputs
ADD Status NVARCHAR(50) NOT NULL constraint df_adc default '未提交'

alter table WH_StoreInputs drop constraint df_adc

UPDATE WH_StoreInputs
SET Status = '已审核'
WHERE CheckStatus = 1


ALTER TABLE WH_StoreOutputs
ADD Status NVARCHAR(50) NOT NULL constraint df_adc default '未提交'

alter table WH_StoreOutputs drop constraint df_adc

UPDATE WH_StoreOutputs
SET Status = '已审核'
WHERE CheckStatus = 1

相关文章:

  • 2021-06-08
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
猜你喜欢
  • 2022-01-26
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
相关资源
相似解决方案