Update query by joining multiple tables.

Поиск
Список
Период
Сортировка
От Moiz Kothari
Тема Update query by joining multiple tables.
Дата
Msg-id 82e1a9bd0701170320j14d4ebdagd66d8c9f095b0192@mail.gmail.com
обсуждение исходный текст
Ответы Re: Update query by joining multiple tables.
Список pgsql-sql
Guys,<br /><br />on page this<br /><br /><a
href="http://www.postgresql.org/docs/8.1/interactive/sql-update.html">http://www.postgresql.org/docs/8.1/interactive/sql-update.html</a>,
itis not specified if a join can be done between multiple tables to update a table, i tried and it worked just fine for
me.Something like this : <br /><br />Infact update can work between multiple tables to... do something like :<br /><br
/>UPDATEemployees SET sales_count = a.sales_count FROM accounts as a<br />  WHERE <a href="http://a.name">a.name</a> =
'AcmeCorporation' <br />  AND <a href="http://employees.id">employees.id</a> = a.sales_person;<br /><br />considering
sales_countas a column in accounts table.<br /><br />Regards,<br />Moiz<br /><br /><br /> 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Removing CONTEXT message
Следующее
От: Marcin Stępnicki
Дата:
Сообщение: Postgresql & Oracle Heteregenous services - strange behaviour