oracle 存储过程中建表

oracle 存储过程中建表


参考

  • https://blog.csdn.net/fred_yang2013/article/details/54586546

注意

因为存储过程中默认没有建表的权限,所有要先赋予建表权限再建表。

 --newsname为数据库用户名,这里需要给他创建表的权限
SQLTEXT := 'grant create any table to newsname'; 
EXECUTE IMMEDIATE SQLTEXT;
--然后执行字符串sql
EXECUTE IMMEDIATE v_createsql;

你可能感兴趣的:(oracle 存储过程中建表)