adding, updating, and deleting data
Add Data
Add data to all fields in a table
INSERT into table name (field name 1, field Name 2, ...)
Values (value 1, value 2, ...);
Insert into table name values (value 1, value 2 ...);
Add data to a specified field in a table
INSERT into table name
SET field name 1= value 1[, field name 2= value 2, ...];
Add multi-day records at the same time
INSERT into table name [(Field name 1, field Name 2, ...)]
Values (value 1, value 2, ...), (value 1, value 2, ...),
... ...
(value 1, value 2, ...);
Update Data
UPDATE Table Name
SET Field Name 1 = value 1[, field Name 2 = value 2, ...]
[WHERE condition expression];
To update one or several records in a table, you need to use the WHERE clause to specify the criteria for updating the record.
If you do not use a WHERE clause, the specified fields of all records in the table are updated
All data: Update student set grade=80;
Delete Data
Delete from table name [where condition expression];
All data: delete from student;
mysql< adding, updating, and deleting data >