Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE TRIGGER tr_b_i_nota
- BEFORE
- INSERT OR UPDATE ON matricula
- FOR EACH ROW
- DECLARE
- excep exception;
- BEGIN
- IF (:NEW.nota_parcial1 < 0 OR :NEW.nota_parcial1 > 20) OR (:NEW.nota_parcial2 < 0 OR :NEW.nota_parcial2 > 20) THEN
- raise excep;
- END IF;
- exception
- WHEN excep THEN
- RAISE_APPLICATION_ERROR(-20002, 'La nota ingresada no debe ser menor a 0 ni mayor a 20. La nota ingresada del primer parcial es : '
- ||to_char(:NEW.nota_parcial1)||' La nota ingresada del segundo parcial es :'||to_char(:NEW.nota_parcial2));
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement