Check out example codes for "alter table foriegn key sql". It will help you in understanding the concepts better.

Code Example 1

ALTER TABLE Orders

ADD FOREIGN KEY (PersonID)
REFERENCES Persons(PersonID);

Learn ReactJs, React Native from akashmittal.com