时间:2021-07-01 10:21:17 帮助过:19人阅读
ALTER TABLE book CHANGE COLUMN publishdate pubDate DATETIME;
修改列的约束和类型
ALTER TABLE book MODIFY COLUMN pubdate TIMESTAMP;
添加新列,要加上类型
ALTER TABLE book ADD COLUMN annual DOUBLE;
删除列
ALTER TABLE author DROP COLUMN annual;
ALTER TABLE author DROP COLUMN IF EXISTS annual;
修改表名
ALTER TABLE author RENAME TO book_author;
表的删除
DROP TABLE book_author;
查看当前库的所以表
SHOW TABLES;
mysql 表的修改
标签:code auth exists lis table 修改表 exist mysql book