Tuesday, June 19, 2018

Example of Unnamed system Exception.(Give Example of Primary key constraint violation) - DBMS (Exception)


declare
exprim exception;
pragma exception_Init(Exprim,-00001);
begin
insert  into student values(2,'Patel','Mehsana');
exception
when exprim then
dbms_output.put_line('Duplicate Elements found');
end;

No comments:

Post a Comment