Re: delete with self join

From: Richard Huxton <dev(at)archonet(dot)com>
To: garry saddington <garry(at)schoolteachers(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: delete with self join
Date: 2007-04-17 08:21:12
Message-ID: 46248378.8010702@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

garry saddington wrote:
> I am trying this syntax which is my interpretation of the docs:
>
> delete from siblings s1 using siblings s2
> WHERE s1.principal = s2.principal
> and s1.sibling=175
>
> Can anyone tell me where I am going wrong?

1. What's happening - are you getting an error?

2. What is the query supposed to do? I can't see why you're not just doing:
DELETE FROM siblings WHERE sibling=175;

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message garry saddington 2007-04-17 09:07:14 Re: delete with self join
Previous Message Alexey Nalbat 2007-04-17 07:15:31 Re: deadlock