nested query - Mailing list pgsql-docs

From Mustapha Amrani
Subject nested query
Date
Msg-id 200101051404.OAA16359@laplace
Whole thread Raw
Responses Re: nested query  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-docs
I have two linked tables Table1 and Table2. I have deleted some rows in table1
Now I need two delete the rows in table2 that correspond to the rows
deleted in table1. The two table are linked by field id.
I tried the following but with no success:
delete * from table2 where not exists (select * from table1 where
table2.id=id);

Any help much appreciated.

Mustapha


pgsql-docs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: postgresql-7.1beta1 initdb error
Next
From: "Oliver Elphick"
Date:
Subject: Re: nested query