Thread: update question

update question

From
"Johnson, Shaunn"
Date:

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