-- 創建源數據表 CREATE TABLE [ tablea ] ( [ col1 ] [ varchar ] ( 50 ) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL , [ col2 ] [ varchar ] ( 50 ) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL ) GO insert tablea(col1,col2) values ( ' 1111 ' , ' 1111 ' ) insert tablea(col1,col2) values ( ' 2222 ' , ' 2222 ' ) -- 創建要追加的數據表 CREATE TABLE [ tableb ] ( [ col1 ] [ varchar ] ( 50 ) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL , [ col2 ] [ varchar ] ( 50 ) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL ) insert tableb(col1,col2) values ( ' 11112 ' , ' 11131 ' ) insert tableb(col1,col2) values ( ' 22223 ' , ' 22322 ' ) GO -- 由b複製到a insert tablea(col1,col2) select col1,col2 from tableb where tableb.col1 not in ( select col1 from tablea) select * from tableb select * from tablea