>From SQL7 7 books online:
Microsoft� SQL Server� supports only reference of foreign key values;
cascading updates and deletes are not supported through the foreign key
constraint mechanism. SQL Server returns SQL_NO_ACTION for the UPDATE_RULE
and DELETE_RULE columns of the SQLForeignKeys result set.
this behavior can be emulated though using triggers:
(Books online, Enforcing Business Rules with Triggers)
Triggers can cascade changes through related tables in the database.
For example, a delete trigger on the title_id column of the titles table
causes a corresponding deletion of matching rows in other tables, using the
title_id column as a unique key to locate rows in titleauthor, sales, and
roysched.
HTH
Dan
-----Original Message-----
From: Bernd VanSkiver [mailto:[EMAIL PROTECTED]]
Sent: 04 June 2001 18:35
To: SQL
Subject: Cascading Deletes
I have a series of tables joined with foriegn keys and
want to do cascading deletes with them so that if a
row from the top table is deleted all the records with
that key will be deleted as well. In SQL 2000 you can
set an option to have this done automatically, but it
doesn't look like SQL 7 has this feature. How do I go
about doing it in SQL 7, wouldn't happen to be an
update that adds this feature is there?
====Bernd VanSkiver
[EMAIL PROTECTED]
ColdFusion Developer
ICQ UIN: 916324
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists