MySQL Foreign Key
Posted 04 March 2006 - 12:25 PM
FOREIGN KEY(keyname) REFERENCES tablename(keyname)
The table was create but foreign keys didn't work. Is foreign keys even supported by mysql and if it is how do I make one?
Posted 04 March 2006 - 03:13 PM
Posted 08 March 2006 - 05:26 PM
I believe foreign keys are supported if you create an InnoDB table, but MyISAM does not support them. You can read about the various differences between InnoDB and MyISAM in the mysql documentation.
I see, good to know. That helps alot, can I combine MyISAM and InnoDB or do I have to make all the connected tables of the same type? For example, can I have a foreign key in a InnoDB table that references to a MyISAM table?
Posted 09 March 2006 - 11:39 AM
Try this: [a href=\"http://mysqld.active-venture.com/example-Foreign_keys.html\" target=\"_blank\"]http://mysqld.active-venture.com/example-Foreign_keys.html[/a]
Posted 09 March 2006 - 02:23 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users