UPDATE
accounts
SET
(contact_last_name, contact_first_name) =
(SELECT
last_name,
first_name
FROM
salesmen
WHERE
salesmen.id = accounts.sales_id
);
Ref : http://www.postgresql.org/docs/current/static/sql-update.html
accounts
SET
(contact_last_name, contact_first_name) =
(SELECT
last_name,
first_name
FROM
salesmen
WHERE
salesmen.id = accounts.sales_id
);
Ref : http://www.postgresql.org/docs/current/static/sql-update.html
No comments:
Post a Comment