永发信息网

执行oracle存储过程,总是出现Warning: Procedure created with compilation errors错误,求高手指点

答案:2  悬赏:20  手机版
解决时间 2021-02-28 00:42
  • 提问者网友:风月客
  • 2021-02-27 02:56
存储过程
create or replace procedure deleteData
AS
begin
TRUNCATE TABLE TEMP;
COMMIT;
end deleteData;
执行后报错:
Warning: Procedure created with compilation errors
show error显示:
LINE/COL ERROR
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------
4/11 PLS-00103: Encountered the symbol "TABLE" when expecting one of the following: := . ( @ % ; The symbol ":= was inserted before "TABLE" to continue.
求大神指点!!!!急急急!!!!
最佳答案
  • 五星知识达人网友:蓝房子
  • 2021-02-27 03:34
这个存储过程有问题,TRUNCATE TABLE不能这样在存储过程里面执行,可以写成:

 EXECUTE IMMEDIATE TRUNCATE TABLE TEMP;才能执行.
全部回答
  • 1楼网友:笑迎怀羞
  • 2021-02-27 03:55
insert下面应该有个commit;(分号也带着)而且你的insert语句后面也没有分号,所以显示命令未结束
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯