From: Daevid Vincent Date: November 26 2003 7:03pm Subject: RE: Inserting data into table1 should insert data into table2's FK ??? List-Archive: http://lists.mysql.com/mysql/154584 Message-Id: <200311261905.hAQJ5M4C027610@daevid> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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" 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=daevid@stripped >