update question - Mailing list pgsql-general

From Johnson, Shaunn
Subject update question
Date
Msg-id 73309C2FDD95D11192E60008C7B1D5BB04C74735@snt452.corp.bcbsm.com
Whole thread Raw
List pgsql-general

Howdy:

Running PostgreSQL 7.2.1 on RedHat Linux 7.2.

I want to update a table, but I would like to know if I
have to use 'SET' in order for this to happen.

I have two tables that have the same structure, but
different data.  They both have primary keys on the
first column (in this case, the column "name").  I
want to do something like:

update only table_a
from table_b
where table_a.name = table_b.name
;

But I keep getting an error saying there is
a problem after the 'from' ... so, I'm
guessing that I have to have SET somewhere ...

So ... why do I need SET and how can I work around this?

Thanks!

-X

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 7.4?
Next
From: Bruce Momjian
Date:
Subject: Re: 7.4?