Conversion from ANSI to Oracle Join Syntax

前端 未结 2 341
暗喜
暗喜 2021-01-25 05:22

I would like to convert the following query:

SELECT
    request.requestId
FROM
    request
    LEFT OUTER JOIN incident ON incident.requestId = request.requestId         


        
相关标签:
2条回答
  • 2021-01-25 05:38

    FYI, in our painful experience, complex ANSI inner joins in Oracle (versions 10,11, and 12) occasionally cause ORA-00600 errors (core dumps). We have been forced to backtrack many of our ANSI joins back to Oracle joins to avoid this.

    0 讨论(0)
  • 2021-01-25 05:48

    You have the (+) on the wrong side, it should be:

    SELECT
        request.requestId
    FROM
        request,
        incident,
        changeRequest
    WHERE
        incident.requestId (+)= request.requestId
        AND changeRequest.requestId (+)= request.requestId
    

    BTW I assume you realse this is the old Oracle syntax? Oracle has supported ANSI joins for a long time now.

    0 讨论(0)
提交回复
热议问题