如何将这两个alter语句组合成一个alter语句
ALTER TABLE A
ADD CONSTRAINT A_FK
FOREIGN KEY (A_PK_ID)
REFERENCES C(A_PK_ID);
ALTER TABLE A
ADD CONSTRAINT B_FK
FOREIGN KEY (D_PK_ID)
REFERENCES E(D_PK_ID);
答案 0 :(得分:0)
假设MS SQL或MySQL,它就像这样
ALTER TABLE A
ADD CONSTRAINT A_FK FOREIGN KEY (A_PK_ID) REFERENCES C(A_PK_ID),
ADD CONSTRAINT B_FK FOREIGN KEY (D_PK_ID) REFERENCES E(D_PK_ID);