Re: [SQL] Cascading Deletes

2000-09-06 Thread Jie Liang
Hi, there, 2 ways may resolve you problem, I believe: 1. re_create your table set _ID as primary key and ID as foreign key with option ON DELETE CASCADE if _ID is unique key. 2. create a rule bind this table, for each row deleting(or create a trigger). Craig May wrote: > Hi, > > I have a ta

Re: [SQL] Cascading Deletes

2000-09-06 Thread Stephan Szabo
I think a references constraint on ID referencing _ID with ON DELETE CASCADE should do what you want. Stephan Szabo [EMAIL PROTECTED] On Wed, 6 Sep 2000, Craig May wrote: > Hi, > > I have a tables having this structure: > > ID (int) | _ID (int) | Name (String) > > > _ID is the parent of ID

[SQL] Cascading Deletes

2000-09-05 Thread Craig May
Hi, I have a tables having this structure: ID (int) | _ID (int) | Name (String) _ID is the parent of ID. I'm looking for the best method to perform a cascade delete. For example, I delete _ID, it in turn deletes ID, and should ID also be an entry within _ID, it would continue through the cha