Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: "ON DELETE CASCADE" references more than one table
> Hi All,
>
> I have a table
>
> CREATE TABLE address (..., ownerId int, ...)
>
> I alse have many other tables, such as employee, contractor, vender.... All
> of these table can own an address.
>
> What is the best way to delete an address if I delete an employee or contractor?
>
> I can not use
>
> FOREIGN KEY (customerId) REFERENCES customer (id)
>
> on address, because I can only reference customer, not employee or contractor.
>
> Any information would be appreciated. Thanks in advance.
I'd say, you're better of if you have employees, contractors, vendors and the like reference the address table. But I do not understand your requirments and I might be wrong.
Rene Nyffenegger
-- no sig todayReceived on Sun Mar 02 2003 - 11:20:33 CST
![]() |
![]() |