题解 | #将titles_test表名修改为titles_2017#
将titles_test表名修改为titles_2017
http://www.nowcoder.com/practice/5277d7f92aa746ab8aa42886e5d570d4
知识点
- alter table 表名 change 原列名 新列名 类型; --修改表的列属性名
- alter table 表名 modify 列名 类型 ; --修改表的类类型
- alter table 表名 drop 列名; --删除表的某一列
- alter table 表名 add 列名 类型;--添加某一列
- alter table 表名 rename to 新表名; --修改表名
代码
alter table titles_test rename to titles_2017