sqlite – 如何在一个语句中更新两列?

前端之家收集整理的这篇文章主要介绍了sqlite – 如何在一个语句中更新两列?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
一次更新2列?

我尝试了以下语句,这不行:

UPDATE exercises
SET times_answered = times_answered + 1
AND av_answeringTime = av_answeringTime + ( (av_answeringTime / (times_answered) ) + ?) * (times_answered + 1)
WHERE name = ?
使用逗号而不是你的“AND”:
UPDATE exercises
SET times_answered = times_answered + 1,av_answeringTime = av_answeringTime + ( (av_answeringTime / (times_answered) ) + ?) * (times_answered + 1)
WHERE name = ?
原文链接:https://www.f2er.com/sqlite/197930.html

猜你在找的Sqlite相关文章