📜  更改表添加外键 mysql 代码示例

📅  最后修改于: 2022-03-11 15:05:33.329000             🧑  作者: Mango

代码示例6
ALTER TABLE ordenes ADD ticket VARCHAR(50) NOT NULL;
ALTER TABLE ordenes ADD CONSTRAINT fk_ticket FOREIGN KEY (ticket) REFERENCES tickets(ticket);