CREATE [DEFINER = {user
| CURRENT_USER }] TRIGGERtrigger_name
trigger_time
trigger_event
ONtbl_name
FOR EACH ROWtrigger_body
One example is :
DELIMITER %%
DROP TRIGGER IF EXISTS delete_comment
CREATE TRIGGER delete_comment
AFTER DELETE ON file_generate_info
FOR EACH ROW
BEGIN
DELETE FROM article_comment WHERE article_id=OLD.article_id;
END%%
The whole create trigger statement should be complete statement but not many separate commands. So we use %% as the statement delimiter. You can choose other symbols as delimiter as well.