Oracle 外連線兩種寫法的乙個例子

2021-05-02 00:48:42 字數 1142 閱讀 8259

1. 用(+)表示  -- (+)風格

select 

target_table.datasource_num_id, 

target_table.integration_id 

from

x_srv_con_line_f target_table, x_srv_con_line_d_pe pe_stage_table

where

target_table.integration_id = pe_stage_table.integration_id(+) and

target_table.datasource_num_id = pe_stage_table.datasource_num_id(+)and 

pe_stage_table.integration_id is null and 

pe_stage_table.datasource_num_id is null and

target_table.delete_*** = 'n' and

target_table.created_on_dt > to_date('20090424','yyyymmdd')

select 

target_table.datasource_num_id, 

target_table.integration_id 

from

x_srv_con_line_f target_table left outer join x_srv_con_line_d_pe pe_stage_table on 

target_table.integration_id = pe_stage_table.integration_id and

target_table.datasource_num_id = pe_stage_table.datasource_num_id

where

pe_stage_table.integration_id is null and 

pe_stage_table.datasource_num_id is null and

target_table.delete_*** = 'n' and 

target_table.created_on_dt > to_date('20090424','yyyymmdd')

flume兩種寫法

1.全寫 bin flume ng agent conf conf name a1 conf file job flume netcat logger.conf dflume.root.logger info,console 2.簡寫 bin flume ng agent n a1 c conf f...

Oracle錶值函式的兩種寫法

建立表 declare cnt integer begin select count 0 into cnt from user all tables where table name cmstemp if cnt 0 then execute immediate create table cmste...

oracle兩種建立外來鍵約束的方式

1 建立表時直接建立外來鍵約束 create table books bookid number 10 not null primary key,bookname varchar2 20 not null,price number 10,2 categoryid number 10 not null...