我想根据两个表的ROWNUM进行外联结,最好只用一条SQL语句实现。比如有A,B两表,当A表的记录数比B表多时,达到A=B(+)的效果,当A表的记录数比B表少时达到A(+)=B的效果。
解决方案 »
- 函数执行无法返回值,请大虾帮忙看看的。
- 能在oracle pl\sql中写入create table...,drop table...这样的语句吗?报错如下:
- 大家都知道用PRO*C来编译用C写的代码是很好的途径,但我现在要用C++写代码,所以不知道用什么命令来编译,要准备些什么,能不能给个示范
- 求SQL count(*) 的结果 放到游标里~~~~我这个SQL 错在哪里 ~~我放不进~
- java.sql.SQLException: Io 异常: End of TNS data channel 这个问题怎么解决啊,各位指点啊
- 如何在ORACLE过程中调用exe文件呢?
- 忙烦大侠们解释一下sql语句的意思 ,好了绝对给分(50)
- utl_file 重写文件
- 求救阿,无法加载oraop10.dll
- oracle报错标识符无效,红色地方报错
- Oracle 9i 中通过参数ALTER TABLE的问题,请教了~
- 如何查找long中的数据???
( select a_id,b_id,... from
(select a.rownum as a_id,... from a ) as A1,
(select b.rownum as b_id,... from a ) as B1
where A1.a_id = B1.b_id(+)
)union allselect b_id,... from
( select a_id,b_id,... from
(select a.rownum as a_id,... from a ) as A1,
(select b.rownum as b_id,... from a ) as B1
where B1.b_id = A1.a_id(+)
and not exists
( select 1 from
( select a_id,b_id,... from
(select a.rownum as a_id,... from a ) as A1,
(select b.rownum as b_id,... from a ) as B1
where A1.a_id = B1.b_id(+)
) XX where XX.a_id = B1.b_id
)
)