CREATE OR REPLACE procedure PAL_4 (v_p_code in product.p_code%type, v_p_name in product.p_name%type, v_p_cost in product.p_cost%type, v_p_group in product.p_group%type) IS v_cnt number(9); p_code_error exception; BEGIN select count(*) into v_cnt from product where p_code = v_p_code; if v_cnt > 0 then raise p_code_error; end if; insert into product(p_code, p_name, p_cost, p_group) values (v_p_code, v_p_name, v_p_cost, v_p_group); insert into stock(p_code, s_qty, s_lastdate) values (v_p_code, 0, sysdate); commit; dbms_output.put_line('완료되었습니다.'); EXECPTION when p_code_error then dbms_output.put_line('기존 p_code가 있습니다.'); when others then dbms_output.put_line('에러입니다.'); ROLLBACK; END pal_4;
이게 PL/SQL 코드고 이미지가 에러 화면 출력입니다..
어디가 문제 일까요??