(MSSQL)INSERT INTO SELECT/SELECT INTO FROM
INSERT INTO SELECT語法
1 | INSERT INTO TABLE2(COL1, COL2,...) SELECT COL1, COL2,... FROM TABLE1 WHERE CONDITION |
INSERT INTO SELECT 語法從一個表複製資料,然後把數據插入到一個已存在的表中。目標表中任何已存在的行都不會受影響。
1 | INSERT INTO TABLE2(COL1, COL2,...) SELECT COL1, COL2,... FROM TABLE1 WHERE CONDITION |
INSERT INTO SELECT 語法從一個表複製資料,然後把數據插入到一個已存在的表中。目標表中任何已存在的行都不會受影響。