On Tue, 7 Aug 2001, Sundararajan wrote:
> I am developing a db application in postgresql and i need to write a delete
> trigger on one of the tables.
>
> I need a delete trigger on the table 1, so that if I delete a row from table
> 1 , the corresponding rows from table 2 should also be deleted.
Let me make sure I get this right:
CREATE TABLE table1
( field1 varchar(64),
... );
CREATE TABLE table2
( field2 varchar(64),
... );
and you want that whenever a row is deleted from table1
you want the SAME row to be deleted from table2?
here's what you want. First, a trigger:
CREATE