56,678
社区成员
发帖
与我相关
我的任务
分享
mysql> select * from sales;
+----+--------+--------+
| id | fruit | amount |
+----+--------+--------+
| 1 | apple | 13 |
| 2 | orange | 2 |
| 3 | pear | 19 |
| 4 | banana | 4 |
| 5 | cherry | 124 |
| 6 | plum | 23 |
+----+--------+--------+
6 rows in set (0.06 sec)
mysql> alter table sales drop column amount;
Query OK, 6 rows affected (0.15 sec)
Records: 6 Duplicates: 0 Warnings: 0
mysql> select * from sales;
+----+--------+
| id | fruit |
+----+--------+
| 1 | apple |
| 2 | orange |
| 3 | pear |
| 4 | banana |
| 5 | cherry |
| 6 | plum |
+----+--------+
6 rows in set (0.01 sec)
mysql>