Mysql"插入select"给我一个"用于调用这个存储函数/触发器的语句#34;错误

时间:2016-11-27 16:00:36

标签: mysql

当我运行那个sql

insert into usersHistoryEvents(date,str,type, userid) 
(select now(),'hello', 'test', users.userId from gamesvidUsers, users
 WHERE gamesvidUsers.userid=users.userId and paid=1)

我收到了这个错误:

#1442 - Can't update table 'users' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. 

有什么想法吗?

0 个答案:

没有答案