Let's take a look at the table structure before deleting:
Mysql> select * from test;
+------+--------+----------------------------------+------------+------------+------------+------------+
| t_id | T_name | T_password | T_birth | Birth | Birth1 | Birth2 |
+------+--------+----------------------------------+------------+------------+------------+------------+
| 1 | name1 | 12345678901234567890123456789012 | NULL | 1990-01-01 | 0000-00-00 | 2013-01-01 |
| 2 | name2 | 12345678901234567890123456789012 | 2013-01-01 | NULL | 0000-00-00 | 2013-01-01 |
+------+--------+----------------------------------+------------+------------+------------+------------+
2 rows in Set (0.00 sec)
Executes the delete command, using the DROP keyword.
The basic syntax is: ALTER TABLE < table name > drop column < field name >;
The specific orders are as follows:
Mysql>ALTER TABLE test drop column Birth1;
Query OK, 0 rows affected (0.13 sec)
records:0 duplicates:0 warnings:0
Look at the results of the deletion, is not there is no birth1 field?
Mysql> select * from test;
+------+--------+----------------------------------+------------+------------+------------+
| t_id | T_name | T_password | T_birth | Birth | Birth2 |
+------+--------+----------------------------------+------------+------------+------------+
| 1 | name1 | 12345678901234567890123456789012 | NULL | 1990-01-01 | 2013-01-01 |
| 2 | name2 | 12345678901234567890123456789012 | 2013-01-01 | NULL | 2013-01-01 |
+------+--------+----------------------------------+------------+------------+------------+
2 rows in Set (0.00 sec)
On the MySQL based on the birthday of the age of the SQL statement Date function, this article on the introduction of so many, I hope to help you, thank you!