Oracle SQL连接问题
表A:a b c d
1 1 2 3
1 1 3 4
表B a b c f
1 1 2 5
SELECT * from A aa, B bb where aa.a=bb.a and aa.b=bb.b
应该会得到 a b c d c f
1 1 2 3 2 5
1 1 3 4 2 5
我怎样才能得到表: a b c d c f
1 1 2 3 2 5
1 1 3 4
SQL code:
SQL>
SQL> with A as (
2 select 1 a, 1 b, 2 c, 3 d from dual union all
3 select 1, 1, 3, 4 from dual
4 ),
5 B as
6 (
7 select 1 a, 1 b , 2 c, 5 f from dual
8 )
9 SELECT aa.*,bb.c,bb.f from A aa left join B bb on aa.a=bb.a and aa.b=bb.b and aa.c= bb.c
10 /
A B C D C F
---------- ---------- ---------- ---------- ---------- ----------
1 1 2 3 2 5
1 1 3 4
相关问答:
执行的顺序:
1)文件浏览框(选择文件使用)
选择好文件后
点击一个导入按钮的时候 ,把上面上传框里的csv文件以一个ID为文件名,上传到**/**文件夹下
2)读取这个文件夹下的csv的文件,转换成sql
3 ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
大家好,我现在把oracle服务器上面的原始文件,下载到本机了.我想在本机访问数据库怎么设置啊.是不是类似可以建立一个什么虚拟服务器来实现.请大家出出主意
引用
大家好,我现在把oracle服务器上面 ......
各位大哥,帮个忙。
下个Oracle for vista 版本的安装试试
10G和11G的
http://www.oracle.com/technology/software/products/database/index.html
------------------------------------------- ......
tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......