有A B 2表
结构如下
A表
id int;
str1 varcha2(30);
str2 varcha2(30);
str3 varcha2(30); B表
id int;
aid int; 外键 关联A表主键
str1 varcha2(30);
str2 varcha2(30);
str3 varcha2(30);
A表数据如下
1 test1 test2 test3
B表数据如下
1 1 test11 test22 test33
2 1 test111 test222 test333
3 1 test1111 test2222 tett3333
求SQL 表头显示 test1 test2 test3 A表的这条记录
里面的数据 test1 是 B表str1 的数据
test2 是 B表str2 的数据
test2 是 B表str3 的数据
结构如下
A表
id int;
str1 varcha2(30);
str2 varcha2(30);
str3 varcha2(30); B表
id int;
aid int; 外键 关联A表主键
str1 varcha2(30);
str2 varcha2(30);
str3 varcha2(30);
A表数据如下
1 test1 test2 test3
B表数据如下
1 1 test11 test22 test33
2 1 test111 test222 test333
3 1 test1111 test2222 tett3333
求SQL 表头显示 test1 test2 test3 A表的这条记录
里面的数据 test1 是 B表str1 的数据
test2 是 B表str2 的数据
test2 是 B表str3 的数据
解决方案 »
- OCI批处理的问题
- O&M系统是什么东西
- Oracle监听启动后自动停止该如何解决
- WIN764位 安装Oracle10g点击setup后就没反应了,要更改的地方也改了,但就是没反应
- 我的經驗和我的問題(在存儲過程中獲取了1個ref cursor,想在Sp裏處理條件,然後再返回這個ref cursor怎麽做?)
- 请问 dbms_output.put_line(i); 是不是向屏幕输出函数? 为什么我看不到的?
- 问个触发器里面变异(变化)表的概念问题~~(新人求助贴,请大家帮忙)
- 我是菜鸟,紧急求救:ORACLE客户端连接服务器出错:“TNS:timed out”
- 关于子查询的条件
- 如何删除数据文件
- 求一个SQL
- 发个关于orical处女的帖子,大家来帮忙看看~~
--是不是这个意思?select a.str1 test1, a.str2 test2, a.str3 test3
from tableA a, tableB b
where a.test1 = b.test1
and a.test2 = b.test2
and a.test3 = b.test3;
from tableA a, tableB b
where a.str1 = b.str1
and a.str2 = b.str2
and a.str3 = b.str3;
我的意思是查A B2表
A表对应的字段内容在上面 B表对应的字段在下面
换个说法就是能不能把A表里str1的值当值B表的别名 再和B表的数据同时显示出来