开发者

(+) syntax for outer joins in mysql [duplicate]

开发者 https://www.devze.com 2023-03-20 02:03 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicates: Oracle “(+)” Operator
This question already has answers here: Closed 11 years ago.

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.

In oracle I could do this

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消