select a.a,a.b from (
select rowid num,t.* from table11 t where t.a in (select distinct f.a from table22 f where f.a=t.a)) a,(
select rowid num,t.* from table11 t where t.b not in (select distinct f.b from table22 f where f.a=t.a))b
where a.num=b.num
这样写可以么?
select rowid num,t.* from table11 t where t.a in (select distinct f.a from table22 f where f.a=t.a)) a,(
select rowid num,t.* from table11 t where t.b not in (select distinct f.b from table22 f where f.a=t.a))b
where a.num=b.num
这样写可以么?
解决方案 »
- 求oracle与mysql的双向同步方案!
- 请问一个关于读一致性的问题
- 一对多这种方式该‘1,2,3’该怎么关联
- 问一个简单的问题,怎样通过命令行的形式怎么连接数据库呢?,查数据库有哪些表?
- Oracle同一个连接中取序列的问题
- 一个select问题,有没有好的方法?高手请进.
- 我觉得很奇怪的问题:表被锁了?
- 在oracle里面,如果有100条记录,排序后取出 第 10 行 到 第 20 行,用什么方法比较好?100分求解
- oracle中有没有bit(sql server中有)数据类型?
- 一个关于oracle中的函数问题
- 请问如何禁用约束,如NOT NULL,如何快速启用约束
- 急啊! 问关于安装ORACLE的问题。
where a in (select distinct a from table22)
and b not in (select distinct b from table22)
where exists(select 1 from table22 t2 where t1.a = t2.a)
and not exists(select 1 from table22 t3 where t1.b != t3.b)
select * from table11 t1
where exists(select 1 from table22 t2 where t1.a = t2.a)
and not exists(select 1 from table22 t3 where t1.b = t3.b)