无效的日期时间格式:1292截断了错误的DOUBLE值

时间:2019-01-21 13:05:42

标签: mysql mysql-error-1064

我在执行此sql查询,然后返回此错误。

我的错误:

  

1292截断了错误的DOUBLE值:   '1,2,3,4,5,6,7,122,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 ,26,157,153,154,155,156'   正在执行的SQL是:

我的查询:

DELETE FROM groups_module_actions 
WHERE module_action_id NOT IN('1,2,3,4,5,6,7,122,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,157,153,154,155,156') AND group_id='1'

1 个答案:

答案 0 :(得分:1)

跳过NOT IN ()中的引号,它的预期数据类型为integer,而不是string

DELETE FROM groups_module_actions WHERE module_action_id 
NOT IN(1,2,3,4,5,6,7,122,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,157,153,154,155,156) 
AND group_id=1