How to write the sql modification statement: [UPDATE table name SET column name = new value WHERE column name = certain value]. The update statement is used to modify data in the data table.
#Update statement is used to modify the data in the table.
(Learning video recommendation: css video tutorial)
Grammar:
UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值
Example:
The Person table is as follows :
Now we update a column in a row. We add the firstname for the person whose lastname is "Wilson":
sql statement:
UPDATE Person SET FirstName = 'Fred' WHERE LastName = 'Wilson'
The changed table is as follows:
Related recommendations: CSS tutorial
The above is the detailed content of How to write sql modification statement. For more information, please follow other related articles on the PHP Chinese website!