sql语句,两个表的不重复记录,急! 知者不难. select a.*from 表1 a left join 表2 b on a.col1=b.col1 and a.col2=b.col2where a.col1 is null 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select col1,col2 from aunion select col1,col2 from b create table t1(a varchar(10),b varchar(10))create table t2(a varchar(10),b varchar(10))insert t1select 'a','1'insert t1select 'a','2'insert t2select 'a','2'/*select * from t1 bbwhere not exists (select * from t2 where a=bb.a and b=bb.b)*/ select col1,col2 from aunion select col1,col2 from b返回合集,不是不重复记录 请帮忙设计下数据类型。 局域网内如何连远程数据库? 并发:我想要了解航空公司、铁路的售票系统是如何处理售票的并发问题的 求一个有点存储过程(数组拆分再添加,晚上结贴) 关于 union all 的问题,我发觉只要union all 语句太多的话,会提示堆栈溢出,请问如何解决?我主要是想实现这样的功能,有一组数据,想 请教:关于生成动态列名的查询 为什么这个存储过程执行不了? 特别的数据交换问题 存储过程的变量赋值问题 如何调用存储过程? 不同数据库之间如何复制表及数据 未装载db-library网络通信层
union
select col1,col2 from b
create table t2(a varchar(10),b varchar(10))insert t1
select 'a','1'
insert t1
select 'a','2'
insert t2
select 'a','2'/*
select * from t1 bb
where not exists (select * from t2 where a=bb.a and b=bb.b)
*/
union
select col1,col2 from b
返回合集,不是不重复记录