本文介绍了MySQL中的插入,删除表(魔术表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是MS-SQL的常规用户,但现在正在从事以mysql作为后端的项目.

I am regular user of MS-SQL but now working on a project which has mysql as a back-end.

请告诉我,在mysql中存在这样的插入/删除表(魔术表),可以在触发器内部或常规查询中使用.

Please tell me that is there exists such a inserted/Deleted tables (Magic tables) in mysql which I can use inside trigger or in normal queries.

推荐答案

在MySQL中,它们分别称为NEWOLD.

They are called NEW and OLD in MySQL.

NEW是要插入的新记录或更新的数据.

NEW is the new record to be inserted or the updated data.

OLD是已删除的记录,或者是更新之前的旧数据.

OLD is the deleted record, or the old data before an update.

在此处查看用于创建触发器的文档: http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html

See the documentation for creating a trigger here: http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html

这篇关于MySQL中的插入,删除表(魔术表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 07:40