MySQL数据库 - 数据库和表的基本操作(一)

罗蓁蓁

关注

阅读 56

2022-01-22

第1关:查看表结构与修改表名

本关任务:修改表名,并能顺利查询到修改后表的结构。

USE Company;

#请在此处添加实现代码
########## Begin ##########

########## modify the table name ##########
alter table tb_emp rename jd_emp;


########## show tables in this database ##########
SHOW tables; 


########## describe the table ##########
DESCRIBE jd_emp;


########## End ##########

第2关:修改字段名与字段数据类型

本关任务:修改表中的字段名,并修改字段的数据类型。

USE Company;

#请在此处添加实现代码
########## Begin ##########

########## change the column name ##########

ALTER TABLE tb_emp CHANGE ID prod_id int(

精彩评论(0)

0 0 举报