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.
精彩评论