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.
javaを使用してmysqlの列全体を更新する方法を知っている人はいますか? オンライン列を 0 に設定する必要があります。
クエリにwhere句を追加しないでください。
例えば
update Person set name="XYZ" where id=1;
ここでは、特定の結果セットのみを更新します。
ただし、where 句のない同じクエリでは、
update Person set name="XYZ".
名前列が XYZ に設定されているすべてのレコードを更新しています。
UPDATE tablename SET online = 0;