Home > Database > SQL > body text

How to write sql modification statement

王林
Release: 2020-11-13 09:52:54
Original
67859 people have browsed it

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 列名称 = 某值
Copy after login

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'
Copy after login

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!

Related labels:
sql
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template