USE [mydb1]
GO
INSERT INTO dbo.mytable1 (
column1
,column2
,column3
,column4
)
SELECT
column1
,column2
,column3
,column4
FROM [mydb2].dbo.mytable2
WHERE EXIST NOT (
SELECT 1 FROM mydb2.dbo.mytable1 c
WHERE c.column1 = column1 ...
AND Any other column
)
1条答案
按热度按时间ccrfmcuu1#
试试这个,也许对你有帮助
对于来自另一个数据库的insert的mysql语法,您可以看到