Merge pull request #5 from cromerc/feature_Trigger
Se agrega Trigger 3 del enunciado.
This commit is contained in:
commit
815e1f1742
11
trigger.sql
Normal file
11
trigger.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user