简体   繁体   English

更新 MySQL 表行 where 和 set 子句列的相同值

[英]Update MySQL table rows where and set clause same values of the column

I would like to update an MySQL Table for a few rows.我想为几行更新 MySQL 表。

update pages
set icon = Arrow
where icon = ArrowBottom;

This didn't work it keeps telling me unknown column ArrowBottom.这没有用,它一直告诉我未知列 ArrowBottom。

This is the solution for my question:这是我的问题的解决方案:

update pages
set icon = 'Arrow'
where icon = 'ArrowBottom';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MySQL选择不在where子句中具有相同表的行 - Mysql select rows with same table not in where clause mysql WHERE CLAUSE排除基于同一列中两个不同值的行 - mysql WHERE CLAUSE to exclude rows based on two different values in same column PHP MySQL使用where子句INSERT来自另一个表的数据,并将唯一值插入到相同的行中 - PHP MySQL INSERT data from another table using the where clause and insert unique values to the same rows MySQL:如何将值更新为多行并同时使用where子句? - MySQL: How to Update values into multiple rows and use where clause as well? MySQL - 根据同一列的值的条件更新行 - MySQL - Update rows on criteria of values of the same column 使用WHERE子句从MySQL同一表的行中删除 - Delete using WHERE clause from the rows of the same table in MySQL MYSQL-UPDATE语句的WHERE子句中的同一表上的子查询 - MYSQL - Subquery on same table in WHERE clause of UPDATE statement MySQL如何在where子句中使用相同的子查询更新表 - mysql how to update table with same subquery in where clause MySql:如何通过检查where子句中的多个字段来更新表的列? - MySql : How to update column of table by checking for multiple fields in where clause? MySQL:仅返回一个表中的行,其中另一个表的一列中的所有值都相同 - MySQL: Return only rows in one table where ALL values in one column of another table are the same
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM