2
다음 병합 절차가 있습니다. 예외 처리 부분의 병합 문에서 값에 액세스하는 방법은 무엇입니까?병합 문에서 값에 액세스
procedure merge_students
is
begin
merge into
students a
using
studentstmp t
on
(a.code = t.code)
when matched then update set a.name = t.name,
when not matched then insert (code,name)
values (t.code,t.name);
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
dbms_output.put_line('students code: ' || a.code); //how to access a.code here
dbms_output.put_line('studentsTMP code: ' || t.code); // and t.code here
end;
끝내 주셔서 감사합니다. – Asterisk
SQL % ... 옵션이 있으면 오류가 있는지 알 수 있습니까? 아니면 내가 잘못 $ 테이블을 쿼리해야합니까? – ShoeLace
신경 쓰지 마 .. 거기 없다 .. http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/sql_cursor.htm – ShoeLace