List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:November 26 2003 7:03pm
Subject:RE: Inserting data into table1 should insert data into table2's FK ???
View as plain text  
You can't INSERT, but with mysql 4.0.15 and better, you can ON UPDATE
CASCADE and ON DELETE CASCADE

Daevid Vincent
http://daevid.com
  

> -----Original Message-----
> From: Egor Egorov [mailto:egor.egorov@stripped] 
> Sent: Wednesday, November 26, 2003 1:24 AM
> To: mysql@stripped
> Subject: Re: Inserting data into table1 should insert data 
> into table2's FK ???
> 
> "Paul Fine" <pfine@stripped> wrote:
> > 
> > If I have two tables with the first table containing a 
> field which is FK of
> > table 2, when I insert a value into this field, should it 
> not automagically
> > insert a value into that PK in the second table?
> > 
> 
> No, it should not insert data in the child table. You should 
> insert data manually.
> 
> 
> 
> -- 
> For technical support contracts, goto 
> https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Egor Egorov
>  / /|_/ / // /\ \/ /_/ / /__   Egor.Egorov@stripped
> /_/  /_/\_, /___/\___\_\___/   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/mysql?unsub=1
> 

Thread
Inserting data into table1 should insert data into table2's FK ???Paul Fine25 Nov
  • Re: Inserting data into table1 should insert data into table2's FK ???Egor Egorov26 Nov
    • RE: Inserting data into table1 should insert data into table2's FK ???Daevid Vincent26 Nov