Jump to content

How to create foreign key in phpMyAdmin?


damju87
 Share

Recommended Posts

I am using phpMyAdmin and currently having trouble trying to make a foreign key. table album - soloID -> table solo artist - id Already tried:

  • Indexing soloID
  • Different sites: youtube, stackoverflow...etc

After searching, I have found nobody actually made a detailed tutorial on how to make a foreign key for somebody who already created tables. Hopefully, somebody can help me here.

Link to comment
Share on other sites

The world doesn't run on tutorials, it runs on specifications and documentation. Here's the manual for foreign keys: http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html Make sure to read the section about constraints, and if you're not aware foreign keys are only supported on InnoDB tables, not MyISAM tables.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...