Re: delete with self join

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: delete with self join
Дата
Msg-id 651304.60165.qm@web31814.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на delete with self join  (garry saddington <garry@schoolteachers.co.uk>)
Список pgsql-general
--- garry saddington <garry@schoolteachers.co.uk> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Ketema"
Дата:
Сообщение: Re: Dynamic DDL
Следующее
От: "Christan Josefsson"
Дата:
Сообщение: Advanced query rewrite