数据仓库服务 GAUSSDB(DWS)-OUTER QUERY (+)

时间:2024-10-26 11:41:27

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_PA RAM _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
;
support.huaweicloud.com/tg-dws/dws_mt_0215.html