I have a table t1 with columns account_id and user_id, and another table users with columns id and account_id. I want to populate t1.account_id with the values of users.account_id.
For instance having
t1 user_id account_id 1 NULL 2 NULL
and
users id account_id 1 10 2 11
I would like to populate t1.account_id with these values:
t1 user_id account_id 1 10 2 11
I've seen this answer for MySQL but can't have it working with PostgreSQL.