1. Import table in the same format as the two tables, import data from one table into another table.
There are now two records in the Person_old table. Next, insert all the records from the Person_old table into the person table, with the following statement:
INSERT into person (id,name,age,info)
SELECT Id,name,age,info from Person_old;
2. "Modify multiple rows of data"
In the person table, update the records with an age value of 19 to 22, change the Info field value to student, and open the Query editing window with the following statement.
SELECT * from the person WHERE age between and 22; --Select Object
UPDATE person SET info= ' student ' WHERE age between 22;
3. "Modify field data for all records"
In the person table, change the value of the info field for all records to VIP, as in the following statement.
SELECT * from person;
UPDATE person SET info= ' VIP ';
4, "Delete part of data"
In the person table, delete the record with age equal to 22, with the following statement.
SELECT * from person;
DELETE from the person WHERE age=22;
5. "Delete all data in the table"
SELECT * from person;
DELETE from person;
SQL from zero to quickly mastering "Data Update"