熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

Oracle數據庫中的(+)連接

2022-06-13   來源: Oracle 

   從表AA (+) =  主表BB

  

  SELECT TO_CHAR(TBAFBS_IO_DATEYYYY/MM/DD) A TBATBA_TBD_NO A TBBTBB_NAME_S A TBCTBC_CHAR A TBDTBD_NAME A TBATBA_SNS_NAME_SP A TBATBA_TORI_KIN A TO_CHAR(TBATBA_RPL_DATEYYYY/MM/DD) A FROM SNTBATRN TBA ZMTBCMST TBC CMTBBMST TBB CMTBDMST TBD WHERE TBATBA_KAI_CODE = XXX AND TBATBA_KESHI_KBN = AND TBATBA_TAISYO_KBN IN ( ) AND TBB_KAI_CODE (+) = XXX AND TBB_BUN_CODE (+) = S AND TBB_START_DATE <= SYSDATE AND TBB_END_DATE >= SYSDATE AND TBBTBB_CODE (+)= TBATBA_STN_CODE AND TBCTBC_KAI_CODE (+) = XXX AND TBCTBC_SUB_KBN (+) = SN AND TBDTBD_KAI_CODE (+) = XXX AND TBDTBD_CODE (+) = TBATBA_SNS_CODE

    主表AA =  從表BB (+)

  SELECT TBATBA_ TBBTBB_ TBCTBC_ FROM TBA (SELECT TBBTBB_ TBBTBB_ FROM TBB WHERE TBBTBB_ LIKE %NEWWEAPON% TBB) TBC WHERE //主表TBC TBATBA_A > //從表TBB AND TBATBA_ = TBBTBB_ //從表TBC //注意TRIM AND TRIM(TBATBA_) = TRIM(TBCTBC_ (+))


From:http://tw.wingwit.com/Article/program/Oracle/201311/18448.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.