Hot answers tagged

1 vote

MySQL: How to make Trigger to insert row in another table?

I want to create an after insert trigger for users to insert a row in one of the others, based in the field users.permissions. This should be a simple if else condition. The trigger verifies the ...
  • 2,999
1 vote

Mysql create trigger if not exist

CREATE TRIGGER `delete_from_code` BEFORE DELETE ON `users` FOR EACH ROW BEGIN delete from code where nom = old.nom ; END YOU CAN CREATE TRIGGERS IF NOT EXISTS LIKE THIS : – String query11 =&...

Only top scored, non community-wiki answers of a minimum length are eligible