Skip to content

Instantly share code, notes, and snippets.

@ffflorian
Last active August 29, 2015 14:10
Show Gist options
  • Save ffflorian/c35a5300a9a735ae21c7 to your computer and use it in GitHub Desktop.
Save ffflorian/c35a5300a9a735ae21c7 to your computer and use it in GitHub Desktop.
Relate two tables in PHPMyAdmin
-- Taken from http://bytes.com/topic/mysql/answers/742624-how-relate-between-two-tables-phpmyadmin
ALTER TABLE table1 ADD FOREIGN KEY (local_key) REFERENCES table2(foreign_key);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment