【发布时间】:2017-12-01 13:09:17
【问题描述】:
我有查询,帮我为 SQL Server 重写它:
insert into swi (co, na, ci, ac, id, version, add)
select co, na, ci, acc, id, ?, address
from swi_tmp
where co||me not in (select co||me from swi)
我有,但还是不行
insert into swi (co, na, ci, ac, id, version, add)
select co, na, ci, acc, id, ?, address
from swi_tmp
where not exists (select 1
from swi_tmp
where swi_tmp.co = swi.co and swi_tmp.na = swi.na)
【问题讨论】:
-
请自己试一试,并说明你卡在哪里了。
-
“不工作”是什么意思?
标签: sql-server