Home > Database > Mysql Tutorial > body text

How to modify the value of a column in mysql

WBOY
Release: 2022-04-12 18:28:47
Original
7487 people have browsed it

In mysql, you can use the Update statement to modify the value of a column. The Update statement is used to modify and update the data of one or more tables. With the WHERE condition, you can modify the data value of the specified column. The syntax is "UPDATE table name SET column name = new value WHERE column name = some value".

How to modify the value of a column in mysql

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

How to modify the value of a column in mysql

In MySQL, you can use the UPDATE statement to modify and update the data of one or more tables.

Basic syntax of the UPDATE statement

Use the UPDATE statement to modify a single table. The syntax format is:

UPDATE <表名> SET 字段 1=值 1 [,字段 2=值 2… ] [WHERE 子句 ]
[ORDER BY 子句] [LIMIT 子句]
Copy after login

The syntax description is as follows: