Inserted, Deleted Tables (Magic Tables) in MySQL

妖精的绣舞 提交于 2019-12-06 03:39:58

问题


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

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.


回答1:


They are called NEW and OLD in MySQL.

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

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

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



来源:https://stackoverflow.com/questions/6282618/inserted-deleted-tables-magic-tables-in-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!