Sorry, I missed PARENT's COLUMNs.

Corrects.

############################################

ALTER TABLE CONS_CHILD ADD  FOREIGN KEY CONS_CHILD_FK ( A , B ) REFERENCES
CONS_PARENT(A, B ) on delete cascade ;
Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> SHOW CREATE TABLE CONS_CHILD ;
+------------+------------------------------------------------------------------
-----------------------------------------------------------------------------+
| Table      | Create Table
|
+------------+------------------------------------------------------------------
-----------------------------------------------------------------------------+
| CONS_CHILD | CREATE TABLE `CONS_CHILD` (
  `A` int(11) NOT NULL default '0',
  `B` int(11) NOT NULL default '0',
  UNIQUE KEY `aa` (`A`,`B`)
) TYPE=InnoDB |
+------------+------------------------------------------------------------------
-----------------------------------------------------------------------------+
1 row in set (0.00 sec)



---------------------------------------------------------------------
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 <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to