今天重新复习了下:仅是用到的部分,
添加字段,删除字段,一次多行插入,修改字段名和类型,分组查询,建类似表(记录的插入步骤已省略)
mysql> alter table score modify cno char(10); ----修改字段类型
Query OK, 0 rows affected (2.35 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> alter table score change column id stu_id int; ----修改字段名称
Query OK, 0 rows affected (2.48 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> show columnsfrom score; ---显示表结构