MySQL Forums
Forum List  »  Newbie

Re: Add referential integrity
Posted by: Barry Galbraith
Date: August 01, 2015 01:37AM

>Can I update DETAIL to enforce this? Foreign-Key?

See the refman for ALTER TABLE Add CONSTRAINT FOREIGN KEY ...

http://dev.mysql.com/doc/refman/5.5/en/alter-table.html

Both tables need to be InnoDB engine or the Foreign Key won't be enforced.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
August 01, 2015 12:26AM
Re: Add referential integrity
August 01, 2015 01:37AM


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.