To drop a column, use a DROP clause that names the column to be removed:
ALTER TABLE eu_countries DROP id;
The above ALTER TABLE/DROP statement changes the table structure as follows:
+----------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+-------+
| name | char(52) | NO | | NULL | |
| new_population | decimal(12,1) | NO | | 0.0 | |
+----------------+---------------+-----+------+---------+-------+
Comments
Post a Comment