MySQL Forums
Forum List  »  MyISAM

Re: Foreign keys in MySQL
Posted by: Roland Bouman
Date: July 03, 2005 03:19PM

Hi!

You can create foreign keys either as part of a CREATE TABLE (manual 13.2.5), or as part of an ALTER TABLE statement (manual, 13.2.2).
If you are using MySQL Administrator, you can add them in the edit table dialog.


The referring table (the one containing the foreign key) as well as the referenced table need to be InnoDB tables. There's word that, in the future, foreign keys will become available in MyISAM, and other storage engines.

Look it up in the manual, 15.7.4

Good Luck!

Options: ReplyQuote


Subject
Views
Written By
Posted
5941
July 01, 2005 03:48AM
Re: Foreign keys in MySQL
5025
July 03, 2005 03:19PM
2800
July 04, 2005 11:07PM
2155
July 05, 2005 01:03AM
2414
July 05, 2005 03:01AM
2466
July 05, 2005 05:11AM
2597
July 05, 2005 05:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.