📜  在sql代码示例中将数据从一个表列复制到另一个表列

📅  最后修改于: 2022-03-11 15:05:33.345000             🧑  作者: Mango

代码示例3
#to copy or update a table column from another table column 
UPDATE table_name1 
    SET column1 = (
        SELECT column2
        FROM table_name2
        WHERE table_name1.id = table_name2.id
    );