Hello I am new to the forum, I have the following problem, I want after I delete a lease table locations I go in the table films and have the film's status to available, but if I have the movie code in table location in another record, I still let the situation of the film table column as leased, how would I do that?
that's what I've done before I did with the film code, but did not seem right, now I did by the id of the lease:
TRIGGER `tguDelete` AFTER DELETE ON `locacoes` FOR EACH ROW UPDATE filmes SET situacao = 'Disponivel' WHERE codigo_filme= OLD.codigo_filme
Please help me!