关于数据库表导入的问题,请高手们指教,在线等。。。。。。。。 我有两个新闻表news1和news2,news1和news2的区别是:news1里面有两个字段c1和l1,而news2里面有两个字段是cc1,ll2,他们所表示的字段意义是相同的,只是名字不同,他们的主键都是id,news1里面的内容多于news2里面的内容,我现在向把news1里面多于news2的字段内容导入到news2表中,将如何实现呢?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 insert into news2(cc1,ll2)select c1,l1from news1where not exists(select 1 from news2 b where news1.c1=b.cc1 and news1.l1=b.ll2) 如果两表是通过ID关联insert into news2(cc1,ll2)select c1,l1from news1where id not in (select id from news2) insert news2select * from news1 where not exists(select 1 from news1 a inner join news2 b on a.id=b.id) insert into news2(id,cc1,ll2)select id,c1,l1from news1where not exists(select 1 from news2 b where news1.id=b.id) 帮忙看看啊! 求修改条语句 模糊查询的写法 sql新人提问:一个简单的动态sql问题 DATEFORMAT问题请教 一条超简单的select,送分 Java 链接sqlserver数据库SelectMethod=cursor 单据编号按部门、月份流水号的请教 在多个工作区中打开同一个表的意义是什么? 关于数据库抽象工厂的实现? 一个奇怪的现像 如何查找两表之间ID不相同的数据
select c1,l1
from news1
where not exists(select 1 from news2 b where news1.c1=b.cc1 and news1.l1=b.ll2)
select c1,l1
from news1
where id not in (select id from news2)
select * from news1 where not exists(select 1 from news1 a inner join news2 b on a.id=b.id)
select id,c1,l1
from news1
where not exists(select 1 from news2 b where news1.id=b.id)