Home >Database >SQL >How to write sql modification statement

How to write sql modification statement

王林
王林Original
2020-11-13 09:52:5467862browse

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.

How to write sql modification statement

#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 :

How to write sql modification statement

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:

How to write sql modification statement

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn