我这里是少加了引号,双引号或者单引号均可以;因为在sql语句里,字符串类型是需要用单引号或者双引号括起来的。 使用update语句的时候,遇到这个错。 原来的sql语句是:
"update user set username="+username
+",password="+password
+",balance="+balance
+"where username=?";
更改后的语句:
"update user set username='"+username
+"',password='"+password
+"',balance="+balance
+"where username=?";
转载请注明原文地址:https://ipadbbs.8miu.com/read-29401.html