Overview
The 3 basic Data Manipulation Language (DML) commands in SQL are:
>insert
>update
>delect
1. Populating a table with new data
1) Data Insertion table
Insert into table_name Values ('value1','value2',[null] );
Numeric or null values are not enclosed in single quotes, others must have single quotes
2) Insert data to the specified column
Insert into table_name ('column1'column2') Values('value1','value2');
3) inserting data from another table
By combining the INSERT statement with the SELECT statement, you can insert query results from one table into the other.
Insert into [(' column1 ', ' Column2 ')] Select [*| (' Column1 ', ' Column2 ')]from[where]
3. Updating existing data
Update table_name set column1='value1', [column2= ' value2 ' ], [column3= ' value3 '][where]
4. Deleting data from the table
Delete from table_name [where]
The Delete command cannot delete data from a column, but instead deletes the entire row of data.
MySQL-Operating data