Se agrega Trigger 3 del enunciado.
This commit is contained in:
parent
8f4b8ccf35
commit
746630624d
11
Triggers.sql
Normal file
11
Triggers.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