How to update an entire table by getting the values from another table?

Поиск
Список
Период
Сортировка
Искать
От
A B
Тема
How to update an entire table by getting the values from another table?
Дата
Msg-id
dbbf25900908310443q510816a1sf2f1d0bd63cc3f29@mail.gmail.com
Список
Дерево обсуждения
How to update an entire table by getting the values from another table? A B <gentosaker@gmail.com>
Re: How to update an entire table by getting the values from another table? "A. Kretschmer" <andreas.kretschmer@schollglas.com>
Hi. I need to run an update query on a table, and need some help on
how to do it.


I have a table A(id integer primary key, prod_id integer, Y1 integer,
Y2 integer, ... Y14 integer)  and a table B (a integer references A, x
integer,unique(a) );

and now I should set (for each row in A)  prod_id to have the value
that is found in table B

How do I write a statement that does that?
В списке pgsql-novice по дате отправления
От: Ruzsinszky Attila
Дата:
От: A. Kretschmer
Дата:
FAQ