how to add foreign key in mysql using alter
snippet in sql

mysql change foreign key

user5070

ALTER TABLE Orders
ADD FOREIGN KEY (PersonID) REFERENCES Persons(PersonID);

alter table add column forigen key mysql

user252

ALTER TABLE tryholpz_demo07.core_modules 
ADD COLUMN belongs_to_role INT, 
ADD FOREIGN KEY core_modules(belongs_to_role) REFERENCES role_specific_modules_info(id) ON DELETE CASCADE

how to add foreign key in mysql using alter

user3962


ALTER TABLE Orders

ADD CONSTRAINT FK_PersonOrder

FOREIGN KEY (PersonID)
REFERENCES Persons(PersonID);