更新时间:2024-06-29 GMT+08:00
分享

OUTER QUERY (+)

GaussDB(DWS)支持JOIN,因此添加supportJoinOperator配置参数。

设置supportJoinOperator=false后OUTER QUERY (+)可迁移。

输入:OUTER QUERY(+)

1
2
3
4
5
6
7
8
9
SELECT PP.PUBLISH_NO 
                     FROM SPMS_PARAM_PUBLISH PP 
                       WHERE PP.PUBLISH_ID(+) = TB2.PUBLISH_ID; 
    
               SELECT  I.APP_CHNAME, I.APP_SHORTNAME 
                     FROM SPMS_APPVERSION SA, SPMS_APP_INFO I 
                      WHERE SA.APP_ID = I.APP_ID(+) 
                       AND SA.DELIVERY_USER = IN_USERID 
                       ORDER BY  APPVER_ID DESC ;

输出

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
SELECT
          PP.PUBLISH_NO
     FROM
          SPMS_PARAM_PUBLISH PP
     WHERE
          PP.PUBLISH_ID (+) = TB2.PUBLISH_ID
;
 
SELECT
          I.APP_CHNAME
          ,I.APP_SHORTNAME
     FROM
          SPMS_APPVERSION SA
          ,SPMS_APP_INFO I
     WHERE
          SA.APP_ID = I.APP_ID (+)
          AND SA.DELIVERY_USER = IN_USERID
     ORDER BY
          APPVER_ID DESC
;

相关文档