zoukankan      html  css  js  c++  java
  • c# 调用存储过程

    //创建存储过程

    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';  这样写即可

  • 相关阅读:
    0425正则数组
    0424php函数
    0424php基础
    string类例题
    数组分为一维数组,二维数组,多为数组
    string类 截取的长度 是否包含某个数
    循环语句2
    /异常语句try,catch.
    string类
    循环语句
  • 原文地址:https://www.cnblogs.com/houzf/p/5765768.html
Copyright © 2011-2022 走看看