草庐IT

customerContact

全部标签

mysql - 插入后触发器在 Mysql 中不起作用

我正在尝试在mysql中设置触发器。实际上,我正在尝试将notes表中的最后插入记录插入到log_trigger中,但下面的代码不起作用。DELIMITER$$CREATETRIGGER`after_note`AFTERINSERTON`notes`FOREACHROWBEGININSERTINTOlog_trigger(NoteId,customerContact,customer,users,note,NoteCreatedTs)SELECTId,customerContact,customer,users,note,CreatedByFROMnotesORDERBYidDESCL