[英]Set data for all columns in table?
I have a table called users
filled with columns. 我有一个名为
users
的表,其中填充了列。 There's a column called daily_points
that I want to change to 3 for every column in the table. 有一个名为
daily_points
的列,我想将表中的每一列更改为3。 How do I do this? 我该怎么做呢? Replace won't work, since it will affect data.
替换将不起作用,因为它将影响数据。
如果要将表users
内的所有rows
daily_points
column
的值设置为3
,则可以使用以下语句。
UPDATE users SET daily_points = 3;
I think you just need an UPDATE
query to set daily_points = 3
for each and every rows of your users
table so 我认为您只需要一个
UPDATE
查询就可daily_points = 3
users
表的每一行设置daily_points = 3
UPDATE `users`
SET `daily_points` = '3';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.