Create trigger in oracle

0

I have three tables: Usuario , Lembrete and Lembrete_Usuario in Oracle. I'm trying to create a trigger that when I insert it into the User table and in the Reminder, take the User and Reminder ids, and put it in the User_Record table.

Tables:

create table Usuario(
  idUsuario number(5),
  nome varchar2(20) not null,
  login varchar2(20) not null,
  senha varchar2(10) not null,
  email varchar2(50) not null,
  constraint idUsuario_pk primary key(idUsuario)    
);
create table Lembrete(
  idLembrete number(5),
  titulo varchar2(255),
  hora number(5,2),
  dataLemb date,
  repetir number(5),
  descricao varchar2(50),   
  constraint idLembrete_pk primary key(idLembrete)  
);

create table Lembrete_Usuario(
  idUsuario number(5),
  idLembrete number(5),
  log_usuario date,
  constraint idUsuarioLembrete_fk foreign key(idUsuario) references Usuario(idUsuario),
  constraint idLembreteUsuario_fk foreign key(idLembrete) references Lembrete(idLembrete)
);

Can anyone help me?

    
asked by anonymous 18.06.2017 / 20:09

0 answers