标签:
//创建存储过程
create or replace procedure nvduser1_ais.p1_delete_tables
as
begin
EXECUTE IMMEDIATE ‘TRUNCATE TABLE vor‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE DESIGNATED_POINT‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE SIGNIFICANT_POINT‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE RTE_SEG‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE EN_ROUTE_RTE‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE SEGMENT‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE SID‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE IAP‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE PROCEDURE_LEG‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE AIRSPACE‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE GEO_BORDER‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE GEO_BORDER_VERTEX‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE EV_EN_COMM‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE PV_AIRPORT_COMM‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE ILS_CAT‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE TAKEOFF‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE LANDSTANDARD_DETAILS‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE LANDSTANDARD‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE OBSTACLE‘;
EXECUTE IMMEDIATE ‘TRUNCATE TABLE COMPANY_RTE‘;
END;
//如果登陆用户和存储过程不在同一个用户下,需要给登陆用户赋予直行存储过程的权限
//否则不需要
//grant execute on P2_DELETE_TABLES to ais_admin;
存储过程使用truncate时 EXECUTE IMMEDIATE ‘TRUNCATE TABLE COMPANY_RTE‘; 这样写即可
标签:
原文地址:http://www.cnblogs.com/houzf/p/5765768.html