MSSQL *
UPDATE table_a
SET table_a.column_a = table_b.column_b
SET table_a.column_a = table_b.column_b
FROM table_a,
table_b,
WHERE table_a.userid = table_b.userid
WHERE table_a.userid = table_b.userid
* 오라클 *
UPDATE table_a
SET column_a = column_b
WHERE userid IN (SELECT userid
FROM b)
SET column_a = column_b
WHERE userid IN (SELECT userid
FROM b)
UPDATE table_a
SET (column_1, column__2) = (SELECT column_a, column_b
FROM table_b
WHERE join_column_1 = table_a.join_column_a);
SET (column_1, column__2) = (SELECT column_a, column_b
FROM table_b
WHERE join_column_1 = table_a.join_column_a);
UPDATE table_a
SET column_1 = (SELECT COLUMN
FROM table_b
WHERE userid = table_a.userid);
SET column_1 = (SELECT COLUMN
FROM table_b
WHERE userid = table_a.userid);
UPDATE table_a
SET (column_1) = (SELECT COLUMN
FROM table_b
WHERE userid = table_a.userid AND url IS NOT NULL);
SET (column_1) = (SELECT COLUMN
FROM table_b
WHERE userid = table_a.userid AND url IS NOT NULL);
[출처] 펌 [오라클,MSSQL] Update ~ Select 구문 예제 |작성자 견공