Here is a MYSQL statement to insert Foreign Keys:
create table table1(lid int(11) not null, tid mediumint(9), tag text, FOREIGN KEY(lid) REFERENCES table2(lid) ON DELETE CASCADE, FOREIGN KEY(tid) REFERENCES table3(tid) ON DELETE CASCADE, PRIMARY KEY(lid,tid));
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment