多列数据一起修改 sql语句
时间: 2023-10-06 11:09:34 浏览: 182
修改数据表的sql语句.txt
要一次修改多列数据的SQL语句,可以使用以下格式:UPDATE 表名 SET 列1 = 值1, 列2 = 值2, ... WHERE 条件;
例如,如果你想要同时修改tb_info_data表中的company和model列,可以使用如下语句:
UPDATE tb_info_data SET company = "HUAWEI", model = "SUN900-pp" WHERE loggerid = '1889956664556664';
这样,该语句会将loggerid为'1889956664556664'的行的company列值修改为"HUAWEI",model列值修改为"SUN900-pp"。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [sql语句修改数据](https://blog.csdn.net/weixin_36294922/article/details/113335455)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [sql语句批量修改mysql单表中某一列中的数据](https://blog.csdn.net/XU441520/article/details/125820252)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文