| From: | Andre Lopes <lopes80andre(at)gmail(dot)com> |
|---|---|
| To: | Scott Ribe <scott_ribe(at)killerbytes(dot)com> |
| Cc: | postgresql Forums <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: It is possible to update more than 1 table in the same update statement? |
| Date: | 2010-11-07 15:20:35 |
| Message-ID: | AANLkTi=1mCZix50cyKn-jGFbB1hW5YdgmfNBNMJJdd-W@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Sorry for not explain well.
I mean update more than one table at the same time with something like this:
update table1, table2
set
table1.f1 = 'aaa',
table2.date = '2001-01-01'
where
table1.id = 'x1' and table2.id = 'x1'
Something like this is possible? It is the best way to do it?
Best Regards,
On Sun, Nov 7, 2010 at 3:11 PM, Scott Ribe <scott_ribe(at)killerbytes(dot)com>wrote:
> On Nov 7, 2010, at 7:58 AM, Andre Lopes wrote:
>
> > need to update various tables in the same update. It is possible to do
> it?
>
> Transactions???
>
> --
> Scott Ribe
> scott_ribe(at)elevated-dev(dot)com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sergey Konoplev | 2010-11-07 15:22:32 | Re: Looking for a Generic lightweight job queueing (stack) implementation. |
| Previous Message | Scott Ribe | 2010-11-07 15:11:54 | Re: It is possible to update more than 1 table in the same update statement? |