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

  • 相关阅读:
    软件测试之测试需求
    如何做页面测试
    如何做查询测试
    如何做报表测试
    SQL server(一)变量的定义
    SQLserver中事务的使用
    Asp.Net MVC中使用中间件对要访问的页面进行Session判断
    python之numpy使用(一)
    SQL Server存储过程的简单使用
    SQLServer游标的简单使用
  • 原文地址:https://www.cnblogs.com/houzf/p/5765768.html
Copyright © 2011-2022 走看看