How to Update Rows With a Join in SQL Server

Last updated July 25, 2026 · By the SaturnSQL team

Use SQL Server's UPDATE ... FROM syntax: update the alias, join the other table in FROM, and SET from the joined columns. Dry-run the same FROM and WHERE as a SELECT first.

UPDATE o
SET o.region = c.region
FROM orders o
JOIN customers c ON c.id = o.customer_id
WHERE c.region IS NOT NULL;

Preview the change first

SELECT o.id, o.region AS old_region, c.region AS new_region
FROM orders o
JOIN customers c ON c.id = o.customer_id
WHERE c.region IS NOT NULL;

If the join matches a target row more than once, SQL Server applies one arbitrary match without warning. Make sure the join key is unique on the source side.

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Related SQL Server guides

© 2026 Panda Capital Oy Ab. All rights reserved.