Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table datos_prueba(
- nombre varchar2(10) primary key,
- numero number(3),
- mensaje varchar(30),
- fecha date);
- create table store_datos_prueba(
- nombre varchar(20) primary key,
- numero number(5),
- mensaje varchar(30),
- fecha date);
- create or replace trigger tgr_trigger_prueba
- after insert on datos_prueba
- for each row
- declare
- cambio_numero number;
- begin
- if :datos_prueba.numero <= 5 then
- insert into store_datos_prueba (nombre,numero,mensaje,fecha) values(:datos_prueba.nombre,666,:datos_prueba.mensaje,:datos_prueba.fecha);
- else
- insert into store_datos_prueba (nombre,numero,mensaje,fecha) values(:datos_prueba.nombre,777,:datos_prueba.mensaje,:datos_prueba.fecha);
- end if;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement