From http://blog.csdn.net/iwtbavcp/article/details/6455704
It's really a cold post that solves my big problem.
MySQL update sdata truncation: Truncated incorrect double value :?? S
Recently I used JSP and MySQL to create something and encountered a problem:
When the update statement is used, data truncation: Truncated incorrect double value :?? Error.
One Of My SQL statements is: Update users set userpwd = '000000' and userrealname = 'admin' where username = 'guoweiin'; this execution is fine.
The other SQL statement is in the same format as the previous one. The difference is that there are many and connected columns, and the above error occurs.
After searching for Baidu for half a day, there was no ending.
I did not expect that at last, a very cold post solved my problem.
Replace and in the update statement with a comma.
For example
Update users set userpwd = '000000', suserrealname = 'admin' where username = 'guoweiin ';
If more columns exist, use commas to join.