Hello.
On my mysql-5.0.6 instance foreign key constraint from your example works. What output does the following statement produce: show variables like 'have_innodb'; "Jan Bartholdy" <[EMAIL PROTECTED]> wrote: > 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 =3D InnoDB > ROW_FORMAT =3D 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 =3D InnoDB > ROW_FORMAT =3D Default; > > > ____________ > Virus checked by G DATA AntiVirusKit > Version: AVK 15.0.4951 from 19.05.2005 > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]