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.
我在 phpMyAdmin (MyISAM) 中使用 SQL 查询框。除非我尝试一次更新多行,否则下面的工作正常。有人可以告诉我我做错了什么吗?
UPDATE table_name SET column_name = 'Air' WHERE row_name = 's003';
如果我尝试添加说'tr003,s005'; ——这行不通。我收到消息“0 行受影响”。我已经搜索但找不到帮助。谢谢你。
您可以IN为此使用一个子句:
IN
UPDATE table_name SET column_name = 'Air' WHERE row_name in ('s003', 'tr003', 's005');