- 相關(guān)推薦
如何操作Oracle數(shù)據(jù)庫(kù)中的(+)連接
本文主要向你介紹的是Oracle數(shù)據(jù)庫(kù)中的(+)連接的實(shí)際操作,本文是以相關(guān)使用代碼的描述來(lái)引出其實(shí)際的操作,你如果是Oracle數(shù)據(jù)庫(kù)中的(+)連接的瘋狂一族的話(huà),就一起來(lái)看看吧!
1. 從表A.A1 (+) = 主表B.B1
復(fù)制代碼SELECT
1.TO_CHAR(TBA.FBS_IO_DATE,'YYYY/MM/DD') A1
2.,TBA.TBA_TBD_NO A2
3.,TBB.TBB_NAME_S A3
4.,TBC.TBC_CHAR1 A4
5.,TBD.TBD_NAME A5
6.,TBA.TBA_SNS_NAME_SP A6
7.,TBA.TBA_TORI_KIN A7
8.,TO_CHAR(TBA.TBA_RPL_DATE,'YYYY/MM/DD') A8
9.FROM
10.SNTBATRN TBA
11.,ZMTBCMST TBC
12.,CMTBBMST TBB
13.,CMTBDMST TBD
14.WHERE
15.TBA.TBA_KAI_CODE = 'XXX'
16.AND TBA.TBA_KESHI_KBN = '0'
17.AND TBA.TBA_TAISYO_KBN IN ('0', '2')
18.AND TBB_KAI_CODE (+) = 'XXX'
19.AND TBB_BUN_CODE (+) = 'S001'
20.AND TBB_START_DATE <= SYSDATE
21.AND TBB_END_DATE >= SYSDATE
22.AND TBB.TBB_CODE (+)= TBA.TBA_STN_CODE
23.AND TBC.TBC_KAI_CODE (+) = 'XXX'
24.AND TBC.TBC_SUB_KBN (+) = 'SN'
25.AND TBD.TBD_KAI_CODE (+) = 'XXX'
26.AND TBD.TBD_CODE (+) = TBA.TBA_SNS_CODE
2. 主表A.A1 = 從表B.B1 (+)
1.復(fù)制代碼
2.SELECT
3.TBA.TBA_1,
4.TBB.TBB_1,
5.TBC.TBC_1
6.FROM
7.TBA,
8.(SELECT TBB.TBB_1, TBB.TBB_2
9.FROM TBB
10.WHERE
11.TBB.TBB_3 LIKE '%NEWWEAPON%' TBB),
12.TBC
13.WHERE
14.主表TBC
15.TBA.TBA_A > 2
16.從表TBB
17.AND TBA.TBA_2 = TBB.TBB_2
18.從表TBC
19.注意TRIM
20.AND TRIM(TBA.TBA_3) = TRIM(TBC.TBC_3 (+))
【如何操作Oracle數(shù)據(jù)庫(kù)中的(+)連接】相關(guān)文章:
ORACLE數(shù)據(jù)庫(kù)操作基本語(yǔ)句09-15
Oracle數(shù)據(jù)庫(kù)中表的四種連接方式07-17
sqlplus如何訪(fǎng)問(wèn)遠(yuǎn)程oracle數(shù)據(jù)庫(kù)10-20
oracle中truncatetable后的數(shù)據(jù)如何恢復(fù)07-30
Oracle數(shù)據(jù)庫(kù)語(yǔ)句大全10-08
ORACLE數(shù)據(jù)庫(kù)碎片的整理08-18
oracle數(shù)據(jù)庫(kù)基本語(yǔ)句08-21
Oracle數(shù)據(jù)庫(kù)認(rèn)證層次08-29