Subject | Re: [ib-support] Delete * with child fields. |
---|---|
Author | Ann W. Harrison |
Post date | 2001-02-20T19:35:09Z |
At 04:20 PM 2/20/2001 -0300, Carlos H. Cantu wrote:
delete from whatever
where not any (select child_id from children
where children.parent = whatever.id)
?
Regards,
Ann
www.ibphoenix.com
We have answers.
>Someone posted this on my discussion group :Something like
>
>Is there a way to delete all the records on a table who actually dont have
>any child on other table (with FK defined) and keep the others out of the
>delete ?
delete from whatever
where not any (select child_id from children
where children.parent = whatever.id)
?
Regards,
Ann
www.ibphoenix.com
We have answers.