Conversion from ANSI to Oracle Join Syntax

前端 未结 2 343
暗喜
暗喜 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: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.

提交回复
热议问题