List:General Discussion« Previous MessageNext Message »
From:Heikki Tuuri Date:December 3 2003 7:21pm
Subject:Re: on delete|update
View as plain text  
Hi!

----- Original Message ----- 
From: ""Martijn Tonies"" <m.tonies@stripped>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, December 03, 2003 4:46 PM
Subject: Re: on delete|update


> Hi,
>
> > Hi there. I am trying to find what these
> > ON DELETE NO ACTION
> >
> > ON UPDATE NO ACTION
> >
> > would provide ib my db..... What are the options and what each of them
do?
>
> These have to do with Foreign Key Constraints. If you're using
> InnoDB tables, you could let MySQL automatically drop any
> child objects by using ON DELETE CASCADE.
>
> NO ACTION will raise an exception if there are child objects
> and you're trying to delete/update a parent row.

I have to correct that

ON DELETE NO ACTION

means that no foreign key check is done at all if there is a DELETE in the
parent table.

The default behavior is RESTRICT, which performs the check.

> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
> Server.
> Upscene Productions
> http://www.upscene.com

Best regards,

Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - hot backup tool for InnoDB which also backs up MyISAM
tables

Order MySQL technical support from https://order.mysql.com/

Thread
on delete|updateAlaios3 Dec
  • Re: on delete|updateMartijn Tonies3 Dec
Re: on delete|updateHeikki Tuuri3 Dec