Re: RE: Help with UPDATE syntax

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: RE: Help with UPDATE syntax
Дата
Msg-id 012e01c0ad8f$335aef60$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на RE: Help with UPDATE syntax  (Michael Davis <mdavis@sevainc.com>)
Список pgsql-sql
From: "Michael Davis" <mdavis@sevainc.com>

> Try eliminating the statement " from user_group_map map".  It does not
belong in the update.  Here is the fully rewritten statement:
>
> update
>          user_group_map
>     set
>          user_id = 4
>     where
>          user_id = 9 and
>          not exists (
>              select * from
>                    user_group_map ug2
>              where
>                     user_id = 4 and
>                     ug2.group_id = map.group_id and                                    ^^^
>                     ug2.role = map.role);                                ^^^
I take it these are actually "user_group_map"?

- Richard Huxton



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

Предыдущее
От: Roberto Mello
Дата:
Сообщение: Contribute to the PL/pgSQL CookBook !!
Следующее
От: jkakar@expressus.com
Дата:
Сообщение: Re: Normalization is always good?