两个表A(col1、col2、col3)
表B(name,code)表A中col、col2、col3都存的是表B的代码,现在要取名字A
col1 col2 col3
---------------------
1 1 2
2 1 3
4 7 8B
code name
------------------
1 中国
2 日本
3 德国
我想一个sql就取出A表中的名称,怎么处理,看看能不能行?
表B(name,code)表A中col、col2、col3都存的是表B的代码,现在要取名字A
col1 col2 col3
---------------------
1 1 2
2 1 3
4 7 8B
code name
------------------
1 中国
2 日本
3 德国
我想一个sql就取出A表中的名称,怎么处理,看看能不能行?
from a, b b1,b b2,b b3
where a.col1 = b1.code(+)
and a.col2 = b2.code(+)
and a.col3 = b3.code(+)