写完存储过程编译的过程中,爆错如下:
出现符号 "END"在需要下列之一时:
错误:PLS-00103: 出现符号 "END"在需要下列之一时:
begin case declare exit for
goto if loop mod null pragma raise return select update while
with <an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe
行:78
文本:end if;
这种时候一般有两种情况,分析如下:
1.掉了结束的符号(如:分号,if的结束end if;最有可能的还是分号),这种属于比较好查的情况,仔细检查即可发现问题。
2.存储过程中可能出现全角的空格,这种错是不可见的,存储过程只接受半角的空格,这种错误属于比较难查的,只能通过断点或者将可能出错的注释点排除查错。实在查不出来,最傻的办法就是重新再写一遍。
总结:在写存储过程中,一定要注意不要使用中文的符号,可能一个符号让你奔溃。