Mysql触发多个表更新

时间:2014-09-24 14:07:58

标签: mysql triggers sql-update

我需要更新表的主键。该主键存在于其他3个表中。

简单示例:

  

模型(ID_model,model)

ID_model存在于其他表中:

table motor(id-model, id-serie, id_year, etc) - 其中id_modelid_serieid_year是primary_key table serie(id-serie, serie, id-model) - 其中id_model是(外键)

如何更新表格ID_model中的model并同时更新其他表格中的ID_model

0 个答案:

没有答案
相关问题