举例:
包
CREATE OR REPLACE PACKAGE "PKG_DIM_AREA" IS PROCEDURE P_DIM_AREA (PI_BATCHNO IN NUMBER); END PKG_DIM_AREA ;
包体
CREATE OR REPLACE PACKAGE BODY "PKG_DIM_AREA" IS PROCEDURE P_DIM_AREA (PI_BATCHNO IN NUMBER ) AS BEGIN --插入与更新 merge into dim_area a using (select XXX from org_orginfo org ) b on (a.sk_area = b.sk_org) when matched then update set a.arealevel = b.org_level when not matched then insert (sk_area ) values (b.sk_org ); COMMIT ; END P_DIM_AREA; END PKG_DIM_AREA ;