Need help with update

Поиск
Список
Период
Сортировка
От A B
Тема Need help with update
Дата
Msg-id dbbf25901002240109j13d987adn6bd7e0c507db5928@mail.gmail.com
обсуждение исходный текст
Ответы Re: Need help with update  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-novice
Hello.
My SQL is a little rusty,

With these tables (where id is unique)

Table Y:
 a  | id
----+---
 10 | 1
 20 | 2
 30 | 3

Table X:

 a | id
---+---
 1 | 1
 2 | 2
 3 | 3

Now I want to update each row in the Y table and set the a value to
the corresponding a value that is found in the X table, matched on the
id.

This means  that in the end, the Y table should contain the same
values as the X table in this case.

But how do I write a command to do that?

В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Wood
Дата:
Сообщение: Re: Seeking experiences 'accessing' Microsoft Active Directory credentials from PostgreSQL, in conjunction with the sys admin / IT...
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Need help with update