Oracle存储过程


-- 编写
create or replace procedure tianjin_risk_forecast is
begin

execute immediate 'TRUNCATE TABLE table_name';
insert /*+append*/ into table_name
(identifynumber
,customer_name
,risk_score
)
SELECT /*+PARALLEL(8)*/
    identifynumber
    ,customer_name
    ,risk_score
FROM
ods_user.ods_risk_customer
;
COMMIT;

end tianjin_risk_forecast;





-- 调用
BEGIN

    tianjin_risk_forecast;
end;