Search Postgresql Archives

Re: delete with self join

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- garry saddington <garry@xxxxxxxxxxxxxxxxxxxx> 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?

What is your query do that is different that what you expect? However, I expect that your query
can effectively be reduced to:

delete from siblings where s1.sibling=175;

since "s1.principal = s1.principal" isn't really doing much reduce the number of rows for
deletion.

Regards,
Richard Broersma


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux