SQL - update table problem...

Поиск
Список
Период
Сортировка
От Marko Rihtar
Тема SQL - update table problem...
Дата
Msg-id BAY121-F957DC8FCE5DB9B180CDAAF8F40@phx.gbl
обсуждение исходный текст
Ответы Re: SQL - update table problem...  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Hi,

i'm trying to make update on multiple tables but don't know how.
is something like this posible with postgresql?

update table1
join table2 on (table1.id=table2.t1)
join table3 on (table2.id=table3.t2)
set table1.name='test', table2.sum=table1.x+table2.y,
table3.cell='123456789'
where table1.id=6

i know that this syntax is not supported with postgres but i tried to
rewrite the code using this synopsis:

UPDATE [ ONLY ] table SET column = { expression | DEFAULT } [, ...]
  [ FROM fromlist ]
  [ WHERE condition ]

i failed again.
updating multiple tables, can it be done?

thanks for help

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


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

Предыдущее
От: "Shoaib Mir"
Дата:
Сообщение: Re: schema synchronization
Следующее
От: Matthias.Pitzl@izb.de
Дата:
Сообщение: Re: SQL - update table problem...