foreign key constraint
foreign key constraint
(OP)
hi,
I am experiencing problems while implementing foreign key
columns in tables . The problem is that even after giving
the references clause in the foreign table the column
allows values that are not there in the master table.
i am using references master_table( primary_key_col )
match full .
any immediate replies will be appreciated.
venkatesh
I am experiencing problems while implementing foreign key
columns in tables . The problem is that even after giving
the references clause in the foreign table the column
allows values that are not there in the master table.
i am using references master_table( primary_key_col )
match full .
any immediate replies will be appreciated.
venkatesh
RE: foreign key constraint
The mysql manual on foreign keys. My understanding is they're not actually implemented. It'll accept the syntax, but calling it a foreign key, and setting references won't make it any different than any other column.
Later on in the manual (http://mysql.org/Manual_chapter/manual_Reference.html#CREATE_TABLE)is this note:
"The FOREIGN KEY, CHECK and REFERENCES clauses don't actually do anything. The syntax for them is provided only for compatibility, to make it easier to port code from other SQL servers and to run applications that create tables with references."
You should really have read this already. It's a very useful manual.