【发布时间】:2019-01-30 08:15:39
【问题描述】:
在过程中使用异常。
插入语句的过程。
CREATE OR REPLACE PROCEDURE pSaveProductGroup (p_parentCode VARCHAR2, p_nameGroup VARCHAR2) IS
v_var "ProductGroups"."code"%type;
BEGIN
select p."code" into v_var
from "ProductGroups" p
where p."code"=p_parentCode;
if v_var is not null then
INSERT INTO "ProductGroups"
("parentCode","nameGroup")
VALUES(p_parentCode,p_nameGroup);
end if;
EXCEPTION
WHEN v_var is null then
dbms_output.put_line('Undefined group.');
END;
它应该在需要时打印异常。
Error: Error(18,12): PLS-00103: Encountered the symbol "IS" when expecting one of the following: . then or
【问题讨论】:
标签: oracle plsql exception-handling