MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:June 9 2005 7:33am
Subject:Re: innoDB and referential action
View as plain text  
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" <mailing_list@stripped> 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
 / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com



Thread
innoDB and referential actionJan Bartholdy8 Jun
  • Re: innoDB and referential actionGleb Paharenko9 Jun