trigger in tables with foreign keys?

0

Good morning classmates I have a question, I'm working on mysql and I'm creating a trigger audit of merchandise entry, what happens is that the table has a foreign key and the triggers that I have done have only been in tables without foreign keys , my question is this, can you make triggers in tables with foreign keys?

/*esta es la estructura de la tabla */

 CREATE TABLE Ingreso(codigoIngreso INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
 fk_codigoProducto VARCHAR(3)NOT NULL,
 tipoProducto VARCHAR (45) NOT NULL,
 fechaIngreso DATETIME NOT NULL,
 FOREIGN KEY (fk_codigoProducto) REFERENCES Producto(codigoProducto));

thanks in advance.

    
asked by Jhon James Hernandez 03.04.2018 в 17:24
source

0 answers