select a.cd,b.cd,c.cd,d.cd,e.cd
from a,b,c,d,e
where a.cd=2 or b.cd=2 or c.cd=2 or d.cd=2 or e.cd=2;
from a,b,c,d,e
where a.cd=2 or b.cd=2 or c.cd=2 or d.cd=2 or e.cd=2;
解决方案 »
- Orcacle10g DACA(DataBase Configuration Assistant)配置数据库失败
- 请问在oracle中,如何将查询结果替换?
- sql语句之时间比较
- 数据同步,能提供一下方案吗?
- LINUX上安装ORACLE的问题。哪位大虾能帮忙。急急急!!!
- Oracle8.05创建表空间的小问题,急!
- null 值的处理,我晕了
- 帮我看吓sql
- 关于pl/sql Developer的问题
- 由于做failover,一个standby已经被我变成了primary库,如何将这个新的primary库(原来的standby)变回来重新成为standby
- Oracle用户授权问题
- 那位大大给出一本初学oracle的书.....谢了!!
select cd from a union select cd from b union ……
union all
select cd from b
.....
from a,b,c,d,e
where a.cd=2 or b.cd=2 or c.cd=2 or d.cd=2 or e.cd=2;
union all
select cd from b
.....同意qiyousyc(沈阳棋友) 的,用UNION联合查询
from a,b,c,d,e
where a.cd=2 or b.cd=2 or c.cd=2 or d.cd=2 or e.cd=2;
是否存在=(case when
(
select 1 from A where CD=2
union
select 1 from B where CD=2
union
select 1 from C where CD=2
union
select 1 from D where CD=2
union
select 1 from E where CD=2
) 1 then '存在' else '不存在' end
)