Hi!

----- Original Message ----- 
From: ""Martijn Tonies"" <[EMAIL PROTECTED]>
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/


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to