一次更新2列?
我尝试了以下语句,这不行:
UPDATE exercises SET times_answered = times_answered + 1 AND av_answeringTime = av_answeringTime + ( (av_answeringTime / (times_answered) ) + ?) * (times_answered + 1) WHERE name = ?
使用逗号而不是你的“AND”:
原文链接:https://www.f2er.com/sqlite/197930.htmlUPDATE exercises SET times_answered = times_answered + 1,av_answeringTime = av_answeringTime + ( (av_answeringTime / (times_answered) ) + ?) * (times_answered + 1) WHERE name = ?