Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 17 Apr 2007 09:21:12 +0100
  • Message-id: <46248378(dot)8010702(at)archonet(dot)com>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group