Dear All, I have two tables entity1 and entity2; the second one should
contain only data with the same "PLZ" as listed in table "entity1".

Unfortunately, I am able to insert in table entity2 data in the field "PLZ",
different from those in the field PLZ in the table "entity1".

What is going wrong?

Many thanks, Jan

Create table Entity1 (
        PLZ Char(20) NOT NULL,
        Ort Char(20),
        UNIQUE (PLZ),
 Primary Key (PLZ)
) ENGINE = InnoDB
ROW_FORMAT = Default;

Create table Entity2 (
        PLZ Char(20) NOT NULL,
        Stra_e Char(20),
 Primary Key (PLZ),
 Constraint Relationship1 Foreign Key (PLZ) references Entity1 (PLZ) on
delete  restrict on update  restrict
) ENGINE = InnoDB
ROW_FORMAT = Default;


____________
Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.4951 from 19.05.2005


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to