Article View: chile.comp.programacion
Article #3905Re: SQL: como puedo borrar un registro y todos los valores asociados a el en otras tablas
From: Cristian Gutierrez
Date: Wed, 21 Apr 2004 04:22
Date: Wed, 21 Apr 2004 04:22
32 lines
3321 bytes
3321 bytes
Eduardo Quiroz Salinas wrote:
> exist๏ฟฝa parece un DELETE ON CASCADE pero no se si funciona en mysql 4.
> alguein sabe aquello?
Google, obviamente...
,----[ http://rucus.ru.ac.za/docs/mysql/InnoDB-foreign-key-constraints.html ]
|
| 7.5.5.2 FOREIGN KEY Constraints
|
| Starting from version 3.23.43b InnoDB features foreign key
| constraints. InnoDB is the first MySQL table type which allows you to
| define foreign key constraints to guard the integrity of your data.
|
| The syntax of a foreign key constraint definition in InnoDB:
|
| [CONSTRAINT [symbol]] FOREIGN KEY (index_col_name, ...)
| REFERENCES table_name (index_col_name, ...)
| [ON DELETE {CASCADE | SET NULL | NO ACTION
| | RESTRICT}]
| [ON UPDATE {CASCADE | SET NULL | NO ACTION
| | RESTRICT}]
`----
PS: es.comp.bd.ms-access ??
--
Cristian Gutierrez http://www.dcc.uchile.cl/~crgutier
crgutier[@]dcc.uchile.cl Jabber:crgutier@jabber.org
There are three kinds of death in this world. There's heart death,
there's brain death, and there's being off the network. -Guy Almes
Technical Details
Message-ID:
<87r7uiufiu.fsf@guti.no-ip.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!cyclone1.gnilink.net!gnilink.net!chi1.usenetserver.com!c03.atl99!news.usenetserver.com!newsfeed.yul.equant.net!news-santiago!helcaraxe.dcc.uchile.cl!guti.no-ip.org!newsReferences:
<c63su8$78c$1@news1.nivel5.cl>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f9ea8,367cb76b8578fd2c X-Google-Attributes: gidf9ea8,public X-Google-Thread: 1593cb,367cb76b8578fd2c X-Google-Attributes: gid1593cb,public X-Google-ArrivalTime: 2004-04-20 21:30:03 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!cyclone1.gnilink.net!gnilink.net!chi1.usenetserver.com!c03.atl99!news.usenetserver.com!newsfeed.yul.equant.net!news-santiago!helcaraxe.dcc.uchile.cl!guti.no-ip.org!news From: Cristian Gutierrez <crgutier@dcc.uchile.cl> Newsgroups: chile.comp.programacion,chile.comp.pc Subject: Re: SQL: como puedo borrar un registro y todos los valores asociados a el en otras tablas Date: Wed, 21 Apr 2004 00:22:01 -0400 Organization: DCC - Universidad de Chile Lines: 32 Message-ID: <87r7uiufiu.fsf@guti.no-ip.org> References: <c63su8$78c$1@news1.nivel5.cl> NNTP-Posting-Host: anakena.dcc.uchile.cl Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: helcaraxe.dcc.uchile.cl 1082518445 30662 192.80.24.3 (21 Apr 2004 03:34:05 GMT) X-Complaints-To: newsmaster@dcc.uchile.cl NNTP-Posting-Date: Wed, 21 Apr 2004 03:34:05 +0000 (UTC) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWwur7b5OE/XHXBz908 bZlrgIsYIjK7HlDKAAABzElEQVR4nHWUwY6jMAyGXVA444m6ZyYDOVMQ8wBd1HMICucu2+b9H2Fs SFrobq2WqvmIHf+/AfybgJsq2l2onkMT+NoDu4ALzOfx/+Cm9kA+wOuOJILLO/B2xzndg6mMqRZQ A0BKX+eMLTegdiHMAXP1BCd3wGd0KtaQx0/cRlfG4s2J/nIZAEHpUlsGIGhd2KCr9XN3C30YxOOA uKABM3+dAhgRHSdPvC8Qcz9/6xXQ3WYpm9z5qr3zEcgBgdcGvky+8DGVHHLPvQxHw+CqXwFkdwZ/ 9eNUYz4zSBlo/ycAF05FqXISy3sTQHPAZlEr5+K/vO8I9L9J3AKlMyR8BjUI7UcbQJvQgVkmxdJD 2qlLALV1AK1cDQOr+gjaFqJV0xyMCoBvXyKLw9C/jOhjSvqXoW72O05clX7kZgcDYVWl1Rpb0FWk iGBTGlVuasjJ0Cr5keJxXQ+gLpx2/Kmc3YNPylM7AQaafwGnGvBjB/KCgVuK70CrKwsHh7mBaQ8s WOdm5+4k4Q50xdIEjiiyZx+VbE9CGagAKmGaCObznQWvBTVB7qYftwjmaft0ysZHMKAyT1AnoFYH rzQz7L+kSuS4M/SklfySefda+gFsN/KqsKywSQAAAABJRU5ErkJggg== User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:2yYoRbOgjlwBH7cDNCwdZirbuTk=