Hi all,
 
I just wonder. I have tried this example from www.mysql.org Doc.
 
CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB;
CREATE TABLE child(id INT, parent_id INT, INDEX par_ind (parent_id),
             FOREIGN KEY (parent_id) REFERENCES parent(id)
             ON DELETE SET NULL
) TYPE=INNODB;

But, the constraint does not work propperly. If i add 1 and 2 in the parent table, and 
1,1 and 1,6 in 
the child table, it still works. 
 
Does anyone know if there is a Bug in the mysql, or im just getting it all wrong???? 
If you know howto make the constraints work please write a little example - Thanks  :-)
 
Regards
Frank Jørgensen
 



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to