由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - tbl1.col1 = tbl2.col2 (+)
相关主题
新手请教几个sqlzoo上的问题change year format in Access by SQL query (转载)
求解释error of sql query in MS Access database (转载)
万佛,请教一个数据库问题 (转载)any informix high hand here? sql need help here.
SQL 查询已经解决.谢谢Modeler,mirthc,cheungchehow to get the result in the middle of resultset?
1. Oracle vs. SQL92 Re: Just问个查询的问题
[转载] Can anyone interpret this simple SQL?Teradata 的大拿呢
SQL Standard包子请教query
error run SQL query from pyodbc python 3.2.5 (转载)新手请教:为什么这个Query不work
相关话题的讨论汇总
话题: join话题: outer话题: tbl2话题: tbl1话题: ansi
进入Database版参与讨论
1 (共1页)
t*********i
发帖数: 217
1
Any one knows what this means?
select tbl1.xx, tbl2.xx from tbl1, tbl2 where tbl1.col1=tbl2.col2 (+)
many thanks!
v*****r
发帖数: 1119
2
Oracle's traditional non-ANSI standard left outer join query, your query is
equivalent to the following two queries if using ANSI stardard:
1. select tbl1.xx, tbl2.xx
from tbl1 LEFT OUTER JOIN tbl2
on tbl1.col1=tbl2.col2;
or
2. select tbl1.xx, tbl2.xx
from tbl2 RIGHT OUTER JOIN tbl1
on tbl2.col2=tbl1.col1;
t*********i
发帖数: 217
3
I see. Thanks a lot.
The syntax is a little strange. tbl1 get all records when tbl2 has a (+)
there.
v*****r
发帖数: 1119
4
哈哈,如果你习惯了 +=, =+ syntax, 看 ANSI out join syntax 还觉得别扭哪。
s*******6
发帖数: 3
5
(+) is the best expression. ANSI out join is for some who is not a DB
developer.
a9
发帖数: 21638
6
这个等于full outer join吗?

is

【在 v*****r 的大作中提到】
: Oracle's traditional non-ANSI standard left outer join query, your query is
: equivalent to the following two queries if using ANSI stardard:
: 1. select tbl1.xx, tbl2.xx
: from tbl1 LEFT OUTER JOIN tbl2
: on tbl1.col1=tbl2.col2;
: or
: 2. select tbl1.xx, tbl2.xx
: from tbl2 RIGHT OUTER JOIN tbl1
: on tbl2.col2=tbl1.col1;

f*******h
发帖数: 53
7
no
v*****r
发帖数: 1119
8
To do "full outer join" using old oracle outer join syntax, you will need a
UNION to union left and right outer join.
Oracle old +=, =+ syntax in most cases are more concise than ANSI syntax,
but ANSI full outer join syntax seems more concise than += UNION =+ old
syntax.

【在 a9 的大作中提到】
: 这个等于full outer join吗?
:
: is

1 (共1页)
进入Database版参与讨论
相关主题
新手请教:为什么这个Query不work1. Oracle vs. SQL92 Re: Just
怎么写这个total的query[转载] Can anyone interpret this simple SQL?
再来一个SQL Server的面试题SQL Standard
Is Netezza really good?error run SQL query from pyodbc python 3.2.5 (转载)
新手请教几个sqlzoo上的问题change year format in Access by SQL query (转载)
求解释error of sql query in MS Access database (转载)
万佛,请教一个数据库问题 (转载)any informix high hand here? sql need help here.
SQL 查询已经解决.谢谢Modeler,mirthc,cheungchehow to get the result in the middle of resultset?
相关话题的讨论汇总
话题: join话题: outer话题: tbl2话题: tbl1话题: ansi