问题
I am fire this sql query and then return this error.
My Error:
1292 Truncated incorrect DOUBLE value: '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' The SQL being executed was:
My Query:
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:
Skip the quotes in the NOT IN ()
, its expecting datatype integer
not a 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
来源:https://stackoverflow.com/questions/54290696/invalid-datetime-format-1292-truncated-incorrect-double-value