开发者

What is wrong with this SQLite3 statement?

I have written this SQLite statement and I am getting syntax error on the following line:

update List SET number = (CASE WHEN number>=3 then number++ WHEN number=1 the开发者_如何转开发n 3 ELSE number END) WHERE listKey=3;

The error is:

SQL error: near "WHEN": syntax error

I tried various versions, adding braces at places and all, but can't figure out the error. Can anyone please help me with this?


If SQLite uses "++" syntax, I've never seen it. Try then number + 1 instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜