Java sqlite更新语句

时间:2014-11-05 14:29:29

标签: java sqlite

"这句话是否正确?它不能通过我的JUnit测试!!!"

我的陈述有什么问题?

它没有通过JUnit测试。

String sqlStringLockWithIP = "UPDATE ACCOUNTS SET " + "LOCKSTATE = "+1+" , " + "IPADDRESS = "+ipAddress+" WHERE ID = " + id;

1 个答案:

答案 0 :(得分:1)

你的意思是:

String sqlStringLockWithIP = "UPDATE ACCOUNTS SET LOCKSTATE = 1, IPADDRESS = '"+ipAddress+"' WHERE ID = " + id;