Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
行数の多いsqliteでテーブルを更新したい
tablenew id status a old b ask c old d old
等...
list = ['a', 'b', 'c'] cur.execute("update tablenew set status =? where id = ?", ('new',list))
Pythonでこれを行う方法は?
IN次の演算子を使用します。
IN
cur.execute("update tablenew set status = ? where id IN ?", ('new', list))