Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding multiple cascade paths
Message
 
 
À
21/08/2008 06:10:50
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01340693
Message ID:
01340740
Vues:
9
You can replace one of ON DELETE CASCADE to RowColumns with a trigger.

>
>Given four tables:
>
>Lists
>Fields : ID
>
>Columns
>Fields : ID, ListId
>
>Rows
>Fields : ID, ListId
>
>RowColumns
>Fields: ID,RowId,ColumnId
>
>If a row in the Lists table is deleted then I want to cascade the delete to both the Columns and Rows tables.
>If a row in the Columns or Rows table is deleted then I want to cascade the delete to relevant rows in the RowColumns table.
>
>If I try to set this up using relationships I can cascade the delete to RowColumns from either the Columns or the Rows table but not both - that causes a 'multiple cascade path error'. How can I achieve the desired behaviour ?
>
>Regards,
>Viv
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform