Home > Database > Mysql Tutorial > What are the basic statements for database addition, deletion, modification and query?

What are the basic statements for database addition, deletion, modification and query?

青灯夜游
Release: 2020-11-04 10:25:44
Original
67658 people have browsed it

Basic statements for add, delete, modify and query in the database: "INSERT INTO table name field list VALUES (value list)", "DELETE FROM table name WHERE clause", "UPDATE table name SET column = value WHERE clause" , "SELECT * FROM table name".

What are the basic statements for database addition, deletion, modification and query?

(Recommended tutorial: mysql video tutorial)

Basic statements for database addition, deletion, modification and query

Add data to the database

In MySQL, you can use the INSERT INTO statement to insert one or more rows of tuple data into an existing table in the database .

Grammar format:

INSERT INTO 表名 ( 列名1, 列名2,...列名N )
                 VALUES
                 ( 值1, 值2,...值N );
Copy after login

If the data is character type, single quotes or double quotes must be used, such as: "value".