oracle mysql 中外连接的 (+) 语法
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6658334/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
(+) syntax for outer joins in mysql
提问by benstpierre
Possible Duplicates:
Oracle “(+)” Operator
Oracle (Old?) Joins - A tool/script for conversion?
I have been somewhat spoiled by using Oracle for years. Now I am using mysql and cannot find a non-ansi version/shorthand version of outer joins in MySQL.
多年来,我一直被 Oracle 宠坏了。现在我正在使用 mysql 并且在 MySQL 中找不到非 ansi 版本/速记版本的外连接。
In oracle I could do this
在 oracle 我可以做到这一点
select a.country acountry,
a.stateProvince aStateProvince,
b.countryName bcountry,
b.name bstateProvince
from User a,
stateprovince b
where a.country*=b.countryName **(+)**
and a.stateProvince*=b.name **(+)**
to get an outer join. Can mysql do something similar?
获得外连接。mysql 可以做类似的事情吗?
回答by ypercube??
Simpler than this:
比这更简单:
select a.country acountry,
a.stateProvince aStateProvince,
b.countryName bcountry,
b.name bstateProvince
from User a
left join
stateprovince b
on a.country = b.countryName
and a.stateProvince = b.name
No.
不。