1. 程式人生 > >ALTER TABLE ADD 增加多個欄位 外來鍵約束

ALTER TABLE ADD 增加多個欄位 外來鍵約束

ALTER TABLE TABLE_USER ADD CONSTRAINT USER_DEPARTMENT_FK FOREIGN KEY(DEPARTMENT_ID) REFERENCES TABLE_DEPARTMENT(DEPARTMENT_ID) ,CONSTRAINT USER_COMPANY_FK FOREIGN KEY(COMPANY_ID) REFERENCES TABLE_COMPANY(COMPANY_ID) ;