SET IDENTITY_INSERT TTTABLE ON --자동증가하는 항목도 포함하여 추가
INSERT INTO TTTABLE
(AA,BB)
Select
AA,BB
FROM OPENROWSET('SQLOLEDB','SEVER_IP';'ID';'PW'
,'select * from TEST..TTTABLE'
) AS a
SET IDENTITY_INSERT TTTABLE OFF
SET IDENTITY_INSERT TTTABLE ON --자동증가하는 항목도 포함하여 추가
INSERT INTO TTTABLE
(AA,BB)
Select
AA,BB
FROM OPENROWSET('SQLOLEDB','SEVER_IP';'ID';'PW'
,'select * from TEST..TTTABLE'
) AS a
SET IDENTITY_INSERT TTTABLE OFF