Inserting into mySQL table with a foreign key that hasn't been created yet.

Posted by ranzy on Stack Overflow See other posts from Stack Overflow or by ranzy
Published on 2010-04-09T20:36:44Z Indexed on 2010/04/09 20:43 UTC
Read the original article Hit count: 246

Filed under:
|

Okay I have two tables. They both have keys. I have another table that references both keys. How can I make a constraint when I add into that third if either of the keys don't exist in the first two tables it won't insert that tuple into the third table. I am inserting in phpMyAdmin. Thanks.

© Stack Overflow or respective owner

Related posts about sql

Related posts about phpmyadmin