From: Marko Rihtar <riki_fox@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: SQL - update table problem...
Date: Mon, 13 Nov 2006 11:36:05 +0100
Message-ID: <BAY121-F6336FF9FF7A48C97A21A3F8F40@phx.gbl> (raw)
Hi,
first i'm sorry if this message appears twice. first time didn't get through
because i wasn't registered.
i'm trying to do 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.
thanks for help
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: riki_fox@hotmail.com
Subject: Re: SQL - update table problem...
In-Reply-To: <BAY121-F6336FF9FF7A48C97A21A3F8F40@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox