Re: Delete with join -- deleting related table entries? - Mailing list pgsql-sql

From Owen Jacobson
Subject Re: Delete with join -- deleting related table entries?
Date
Msg-id 144D12D7DD4EC04F99241498BB4EEDCC20CC5A@nelson.osl.com
Whole thread Raw
In response to Delete with join -- deleting related table entries?  (Bryce Nesbitt <bryce1@obviously.com>)
List pgsql-sql
Owen Jacobson wrote:

> BEGIN;
>   DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
>     WHERE reservation_id = reservation_to_delete);
>   DELETE FROM isuse WHERE reservation_id = reservation_to_delete;
>   DELETE FROM reservations WHERE reservation_id =
> reservation_to_delete;
> END;

That should be COMMIT;, not END;.  Been writing too much pl/pgsql.
-Owen


pgsql-sql by date:

Previous
From: Bryce Nesbitt
Date:
Subject: Re: Delete with join -- deleting related table entries?
Next
From: "BigSmoke"
Date:
Subject: Re: regarding debugging?