2556-01-09

update join sql server


UPDATE
    Table
SET
    Table.col1 = other_table.col1,
    Table.col2 = other_table.col2
FROM
    Table
INNER JOIN
    other_table
ON
    Table.id = other_table.id


http://stackoverflow.com/questions/2334712/sql-server-update-from-select

ไม่มีความคิดเห็น:

แสดงความคิดเห็น