Delete across 5 Joined tables

From: Fuzzygoth <dav(dot)phillips(at)ntlworld(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: braym(at)cromwell(dot)co(dot)uk
Subject: Delete across 5 Joined tables
Date: 2008-08-15 10:08:31
Message-ID: 2bc56296-2b46-49e1-bc46-f51f92813276@d1g2000hsg.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I am trying to delete a set of related record across the whole
database, In tests I
have managed to delete records from 2 tables using the code below.

DELETE FROM phillipsd.tablea using phillipsd.tableb WHERE tablea.one =
2;

but I need to be able to delete from up to 5 different tables, is
there a quick and
simple way of doing this? can someone post an example?

Cheers
David P

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erwin Moller 2008-08-15 10:44:23 UTF8 in commandprompt (CMD) on XP fails. Tips?
Previous Message Harshad Pethe 2008-08-15 10:00:40 Hi