mysql添加外键约束
ALTER TABLE scm_material_contract ADD CONSTRAINT material_contract_foreignid FOREIGN KEY(form_id) REFERENCES scm_purchase_contract(contract_id) ALTER TABLE scm_material_contract_add ADD CONSTRAINT material_contract_add_foreignid FOREIGN KEY(form_id) REFERENCES scm_purchase_contract_add(sub_contract_id) ALTER TABLE scm_material_settle_sd ADD CONSTRAINT material_settle_foreignid FOREIGN KEY(form_id) REFERENCES scm_sd_settle(settle_id) ALTER TABLE scm_material_settle_yd ADD CONSTRAINT material_settle_yd_foreignid FOREIGN KEY(form_id) REFERENCES scm_yd_settle(settle_id)
删除外键:
alter table product drop foreign key product_ibfk_1
相关推荐
敏敏张 2020-11-11
数据库之扑朔迷离 2020-08-18
北桥源木 2020-08-15
ssjdoudou 2020-08-09
boredbird 2020-08-07
InJavaWeTrust 2020-06-21
QianChia 2020-06-14
窃破天道 2020-06-12
KaiZhaoKZ 2020-05-30
Lius 2020-05-27
Rain 2020-04-15
dreamhua 2020-04-30
dayi 2020-04-29
iflreey 2020-04-29
bluetears 2020-04-18
neverstopforcode 2020-04-15
chenjiazhu 2020-03-28
aweilark 2020-03-06
imacoder 2020-02-23