java更新mysql表内容出错
程序员文章站
2022-05-04 08:29:03
...
mysqljava
sql语句:
public static void deleteUser(String loginName){
String sql = "update user set flag=3 where loginName= "+ loginName ;
DBUtil.getInstance().delete(sql);
}
错误信息:
java.sql.SQLException: Data truncation: Truncated incorrect DOUBLE value: 'admin' Query: update user set flag=3 where loginName= 123654 Parameters: []
不太懂是怎么错了