下列关于ALTER TABLE语句叙述错误的是(c)。
A、ALTER TABLE语句可以添加字段
B、ALTER TABLE语句可以删除字段
C、ALTER TABLE语句可以修改字段名称
D、ALTER TABLE语句可以修改字段数据类型
alter table 不是可以修改字段名称吗?
你说的对,ABCD均是正确的。题有误
都是对的吧
alter table <tableName> add [column] 字段名 字段类型 [约束] [注释] ;
alter table t_book add is_borrow boolean comment '是否被借' ;
alter table <tableName> change oldName newName 字段类型 [约束] [注释] ;
alter table t_book change name book_name varchar(50) comment '图书名';
alter table <tableName> modify <columnName> 要修改的类型 [约束] [注释] ;
alter table t_book modify status enum('0', '1') comment '0代表下架'‘;
alter table <tableName> drop [column] <columnName> ;
alter table t_book drop is_borrow ;
alter table <tableName> rename to <newTableName> ;
alter table t_book rename to book ;
rename table <tableName> to <newTableName> ;
rename table book to t_book ;