Únase a la consulta de actualización en SQL
UPDATE A
SET foo = B.bar
FROM TableA A
JOIN TableB B
ON A.col1 = B.colx
WHERE ...
Calm Chimpanzee
UPDATE A
SET foo = B.bar
FROM TableA A
JOIN TableB B
ON A.col1 = B.colx
WHERE ...
UPDATE
t1
SET
t1.c1 = t2.c2,
t1.c2 = expression,
...
FROM
t1
[INNER | LEFT] JOIN t2 ON join_predicate
WHERE
where_predicate;
//mysql
UPDATE store_fars
INNER JOIN
fake ON store_fars.id = fake.id
SET
fake.id = store_fars.id
MySQL:
update ud u
inner join sale s on
u.id = s.udid
set u.assid = s.assid
----------------
SQL Server:
update u
set u.assid = s.assid
from ud u
inner join sale s on
u.id = s.udid
---------------
PostgreSQL:
update ud
set assid = s.assid
from sale s
where ud.id = s.udid;