我有一个看起来像这样的 PL/SQL 块:
declare
L_Count number := 10;
begin
if L_Count > 0then
dbms_output.put_line('l_Count > 0');
else
dbms_output.put_line('l_Count <= 0');
end if;
exception
when others then
dbms_output.put_line('exception occurred');
end;
请注意第四行包含0then
而不是0 then
.
使用 PL/SQL-Developer,我可以将此块作为 SQL 语句执行,它实际上输出l_Count > 0
. 使用“程序窗口”并编译它,PL/SQL-Developer 会出现以下错误:
Unable to perform operation due to errors in source code
该语句如何执行但不编译?
谢谢你的提示!