获取两数据库之间相同表,不同行_查询 插入 的SQL语句

获取两数据库之间相同表,不同行的SQL语句
select * from jct_oa.dbo.xxfb_lb where unid not in(select unid from cjyglc_web.dbo.xxfb_lb)

获取两数据库之间相同表,不同行的,并将不同行的值,并插入新的数据库数据表中
insert into cjyglc_web.dbo.test select * from jct_oa.dbo.test where unid not in(select unid from cjyglc_web.dbo.test)

猜你喜欢

转载自110shen110.iteye.com/blog/2191708
今日推荐