- Modify and backup, the batch sometimes we want to modify and delete the database table and database, you can implement: 1, add a column: Add a column in the MyTable table in the previous example, indicate whether single Single: MySQL> ALTER TABLE MYTABLE ADD Column Single Char (1); 2. Modify Record Modify ABCCS's Single Record to "Y": mysql> Update MyTable Set Single = 'Y' Where Name = 'Abccs'; now come to see what happened : Mysql> select * from mytable; ---------- ---- ---------- ---------- - -------- | Name | SEX | Birth | BIRTHADDR | SINGLE | ---------- ------ --------- --- ----------- -------- | ABCCS | F | 1977-07-07 | China | Y | | Mary | F | 1978-12-12 | USA | NULL | | Tom | M | 1970-09-02 | USA | NULL | ---------- ---- ----------- - --------- -------- 3, before adding records, how to add a record, for easy view, repeat and this: mysql> Insert Into myTable - > VALUES ('ABC', 'F', '1966-08-17', 'CHINA', 'N'); Query Ok, 1 Row Affected (0.05 sec) check: mysql> select * from myTable; - --------- ------ ------------ --------------------------- -------- | Name | SEX | BIRTH | BIRTHADDR | SINGLE | ---------- ---- ---------- ---------------- -------------- ------ ----- -------- | Abccs | f | 1977-07-07 | China | Y | | MARY | F | 1978-12-12 | USA | NULL | | Tom | M | 1970-09-02 | USA | NULL | | ABC | F | 1966-08-17 | China | N | --- ------- ------ ---------- ---------- -------- 3 , Delete records Use the following command to delete a record in the table: mysql> delete from myTable where name = 'abc'; delete removes a record that satisfies the conditions given by WHERE.