Read more

PostgreSQL: How to UPDATE multiple attributes with multiple joins

Emanuel
January 03, 2018Software engineer at makandra GmbH

This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN.

UPDATE employees
SET department_name = departments.name,
  department_area = areas.name
FROM departments, areas
WHERE employees.department_id = departments.id
AND departments.id = areas.department_id
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot
Posted by Emanuel to makandra dev (2018-01-03 18:27)