oracle手动调用存储过程 oracle如何创建存储过程呢?
oracle如何创建存储过程呢?
首先需要授权
sqlplus / as sysdba
grant create view to your_user
然后创建表和存储过程
drop table table1create table TABLE1( user_id VARCHAR2(10), user_name VARCHAR2(10), user_mail VARCHAR2(10), user_mobile VARCHAR2(10), user_telephone VARCHAR2(10))CREATE OR REPLACE PROCEDURE CREATEVIEWS IS V_SQL VARCHAR2(10240)BEGIN V_SQL := "CREATE OR REPLACE VIEW V_TEST AS SELECT T1.USER_ID, T1.USER_NAME, --用户姓名 T1.USER_MAIL, --用户MAIL T1.USER_MOBILE, --用户手机 T1.USER_TELEPHONE --用户电话 FROM TABLE1 T1" EXECUTE IMMEDIATE V_SQLEND CREATEVIEWS/
执行,OK
SQL> exec createviewsPL/SQL procedure successfully completed
oracle手动调用存储过程 oracle call 存储过程 oracle如何执行存储过程
版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。