mysql>
DESC
tb_emp1;
+
| Field | Type |
Null
|
Key
|
Default
| Extra |
+
| col1 |
int
(11) | YES | |
NULL
| |
| id |
int
(11) | YES | |
NULL
| |
|
name
|
varchar
(30) | YES | |
NULL
| |
| col2 |
int
(11) | YES | |
NULL
| |
| deptId |
int
(11) | YES | |
NULL
| |
| salary |
float
| YES | |
NULL
| |
+
6
rows
in
set
(0.00 sec)
mysql>
ALTER
TABLE
tb_emp1
->
DROP
col2;
Query OK, 0
rows
affected (0.53 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
DESC
tb_emp1;
+
| Field | Type |
Null
|
Key
|
Default
| Extra |
+
| col1 |
int
(11) | YES | |
NULL
| |
| id |
int
(11) | YES | |
NULL
| |
|
name
|
varchar
(30) | YES | |
NULL
| |
| deptId |
int
(11) | YES | |
NULL
| |
| salary |
float
| YES | |
NULL
| |
+
5
rows
in
set
(0.00 sec)