日期:2014-05-18 浏览次数:20500 次
update a set a107=b.a107,a108=b.a108,....,a200=b.a200 from bzml_tb1 a inner join bxb_tb1 b on a.a100=b.a100 insert bzml_tb1 (a100,a107,a108,...,a200) select b.a100,b.a107,...,b.a200 from bxb_tb1 b left join bzml_tb1 a on a.a100=b.a100 where a.a100 is null update a set a107=b.a107,a108=b.a108,....,a200=b.a200 from bzml_tb2 a inner join bxb_tb2 b on a.a100=b.a100 insert bzml_tb2 (a100,a107,a108,...,a200) select b.a100,b.a107,...,b.a200 from bxb_tb2 b left join bzm_tbN a on a.a100=b.a100 where a.a100 is null ..... update a set a107=b.a107,a108=b.a108,....,a200=b.a200 from bzml_tbN a inner join bxb_tbN b on a.a100=b.a100 insert bzml_tbN (a100,a107,a108,...,a200) select b.a100,b.a107,...,b.a200 from bxb_tbN b left join bzml_tbN a on a.a100=b.a100 where a.a100 is null
------解决方案--------------------
insert into xz_bzml
select * --不行的话改为字段名A100、A107、A108、A109、A110
from bxb
where a100 not in (select distinct a100 from xz_bzml)
------解决方案--------------------
fcuandy 的写法里已经包含插入了,应该没问题
------解决方案--------------------
insert 没有into 能写入吗
t-sql 不需要into也可插
jetsql必须要