Subject | Re: [ib-support] Mass deletion |
---|---|
Author | Ann Harrison |
Post date | 2002-04-09T19:46:48Z |
At 04:31 PM 4/9/2002 +0530, Nataraj S Narayanan wrote:
delete drug_bill_item where drug_bill_item.bill_id = old.bill_id;
Without it, you've specified an identity and it will delete everything.
Regards,
Ann
>Just created and tried a trigger in drug_bill. The following is the bodyYes. You need the alias "old" on the second bill_id.
>of the trigger
>
>BEGIN
>
>delete drug_bill_item where drug_bill_item.bill_id=bill_id;
>
>END;
>
>The result is startling!! it empties the drug_bill_item table when i
>delete records in drug_bill.
>
>Something wrong with the trigger?
delete drug_bill_item where drug_bill_item.bill_id = old.bill_id;
Without it, you've specified an identity and it will delete everything.
Regards,
Ann