复制代码DELIMITER $$ CREATE TRIGGER `触发器名称` AFTER INSERT ON `原表名`FOR EACH ROWBEGIN INSERT INTO `audit_log` ( `table_name`, `record_id`, `action_type`, `timestamp` ) VALUES ( 'orders', NEW.id, 'INSERT', NOW() );END$$ DELIMITER ;https://blog.51cto.com/u_16213343/8713389