dear one,
create table smita(n number,name varchar2(30));
insert into smita values(1,'iii');
insert into smita values(2,'iii');
insert into smita values(3,'iii');
insert into smita values(4,'iii');
CREATE OR REPLACE TRIGGER tg_smita
after insert or update on smita
declare
v_count number(9);
begin
select count(*) into v_count from smita;
if v_count > 0 then
raise_application_error(-20777,'already exist');
end if;
end;
insert into smita values(7,'iii')
ORA-20777: already exist
ORA-06512: at "IPLSMCDEV.TG_SMITA", line 6
ORA-04088: error during execution of trigger 'IPLSMCDEV.TG_SMITA'
i want to display only ora-20777 msg
and dont want ora-06512
how can i do ?
pls help
smita.