Untitled

 avatar
unknown
plain_text
6 months ago
477 B
2
Indexable
create or replace trigger dob_check
    before insert on students
    for each row
  begin
    if :new.dob > sysdate then
       raise_application_error(-20001, 'Person can not be born in the future');
    end if;
  end;
/

create or replace trigger mark_check
    before delete on students
    for each row
  declare
    c number:=120;
  begin
    if :old.marks > c then
       raise_application_error(-20002, 'Maximun mark exceeded');
    end if;
  end;
/
Editor is loading...
Leave a Comment