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.
PythonでmySQLdbを使用してデータベースにデータをインポートしてきましたが、特定の行をアドレス指定してその行のセルを更新できるようにしたいのですが、mySQLdbヘルプでこれを行うコマンドが見つかりませんでしたファイル、誰かが私を正しい方向に向けるのに十分親切でしょうか...
ありがとう、
sqlUPDATEステートメントを使用できます
psuedoデータスキーマ:
# table people id INT, name VARCHAR(40), age INT, address VARCHAR(100) 1, john, 33, North America 2, dm03514, 28, Maryland
pythongMySQLdbを使用する
cursor.execute('UPDATE people SET address = %s WHERE id = %s', ('Columbia, MD', 2));