How to increase the value of a field in mysql

青灯夜游
Release: 2021-12-10 18:10:13
Original
10680 people have browsed it

In mysql, you can use the INSERT statement to increase the value of the field. The syntax is "INSERT INTO table name field name list VALUES (value list);" or "INSERT INTO table name SET field name 1 = value 1, Field name 2 = value 2,…”.

How to increase the value of a field in mysql

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

In mysql, you can use the INSERT statement to increase the value of a field.

The INSERT statement can insert one row or multiple rows of tuple data into an existing table in the database.

The INSERT statement has two syntax forms, namely the INSERT…VALUES statement and the INSERT…SET statement.

1) INSERT…VALUES statement

INSERT VALUES 的语法格式为: INSERT INTO <表名> [ <字段名1> [ , … <字段名n>] ] VALUES (值1) [… , (值n) ];
Copy after login

The syntax is explained as follows.