0
点赞
收藏
分享

微信扫一扫

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

罗蓁蓁 2022-01-22 阅读 56

第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 条评论