Can a MySQL trigger be associated to more than one table or by all tables?

后端 未结 1 931
梦如初夏
梦如初夏 2021-01-19 00:03

I have created this trigger to insert a value calculated value to a field in the table in case the user forget to put the data himself:

DELIMITER //
CREATE T         


        
相关标签:
1条回答
  • 2021-01-19 00:30

    No. The syntax doesn't provide for it.

    It makes no sense to allow it, because the NEW keyword must refer to a particular row definition. If you have two tables with the same row definition, they should be made into the one table, with another column denoting the difference.

    0 讨论(0)
提交回复
热议问题