可能重复:
Oracle “(+)” Operator
所以给了我一个带有以下内容的脚本:
SELECT BLAH
FROM A_TABLE T1, A_TABLE T2, A_TABLE T3
WHERE T2.FIELD_1(+) = T1.FIELD_1
AND T3.FIELD_1(+) = T2.FIELD_1
... etc a few more AND clauses that do that same thing
我需要将此脚本转换为MSSQL Server,但我不知道该运算符正在做什么。这可能是某种错字吗?
答案 0 :(得分:7)
这是外连接的旧Oracle语法。您应该使用ANSI连接语法:
SELECT BLAH
FROM A_TABLE T1
LEFT JOIN A_TABLE T2 ON T2.FIELD_1 = T1.FIELD_1
LEFT JOIN A_TABLE T3 ON T3.FIELD_1 = T2.FIELD_1
WHERE ... etc
答案 1 :(得分:3)
这是LEFT JOIN的Oracle表示法。
这意味着
SELECT BLAH
FROM A_TABLE T1
LEFT JOIN A_TABLE T2 ON T2.FIELD_1 = T1.FIELD_1
LEFT JOIN A_TABLE T3 ON T3.FIELD_1 = T2.FIELD_1
... etc a few more AND clauses that do that same thing
(+)与可选方面相对。另请阅读: