Mysql delete, add, modify column name

ALTER TABLE: Add, modify, delete table columns, constraints and other table definitions.

View column: desc table name;

Modify the table name: alter table t_book rename to bbb;

Add column: alter table table name add column column name varchar(30);

Delete column: alter table table name drop column column name;

Modify the column name: alter table bbb change nnnnn hh int;

Modify column attributes: alter table t_book modify name varchar(22);

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326617899&siteId=291194637