Check out example codes for "create foreign key phpmyadmin". It will help you in understanding the concepts better.

Code Example 1

ALTER TABLE table_name
ADD CONSTRAINT fk_foreign_key_name
FOREIGN KEY (foreign_key_name)
REFERENCES target_table(target_key_name);

Learn ReactJs, React Native from akashmittal.com