我有以下代码来更新表中的值。当我运行代码时,我收到错误near "(": syntax error
。
这是我的代码:
cursor.execute('UPDATE playerList SET (gamesPlayed, totalPTS, totalREB, totalAST, totalSTL, totalTO, totalBLK, ftMade, ftAttempts, fgMade, fgAttempts, threeptMakes, threeptAttempts) = (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) WHERE playerCode = (?)', (newGp, newTotPts, newTotReb, newTotAst, newTotStl, newTotTo, newTotBlk, newFtMade, newFtAttempt, newFgMade, newFgAttempt, newThreePointMade, newThreePointAttempt, code))
我哪里错了?
答案 0 :(得分:0)
仅在SQLite 3.15.0或更高版本中支持行值。如果您有早期版本(可能是任何当前的Python版本),则必须使用标准SQL语法documented in the documentation。