Merge pull request #5 from cromerc/feature_Trigger

Se agrega Trigger 3 del enunciado.
This commit is contained in:
2020-06-09 13:58:56 -04:00
committed by GitHub

11
trigger.sql Normal file
View File

@@ -0,0 +1,11 @@
CREATE OR REPLACE TRIGGER correlative_increment BEFORE INSERT ON ciudad FOR EACH ROW
DECLARE
idCiudad number;
BEGIN
SELECT MAX(id_ciudad) INTO idCiudad FROM ciudad;
:new.id_ciudad := idCiudad + 1;
END;