错误:截断错误的double值

时间:2017-08-31 08:44:21

标签: mysql triggers

我创建了一个这样的触发器:

create trigger mydb.t_count  after insert
on mydb.titles 
for each row 
update  mydb.authors set titles_count= 'titles_count'+1 where author_id=new.author_id;

在titles表格中插入一行时,我收到错误说明

  

截断错误的双重值:titles_count

我认为必须在update命令中更改某些内容。如何在其中执行算术运算?每当在titles表中插入一行时,我需要将titles_count值(作者表)增加1 ...

0 个答案:

没有答案