1:查看原始数据库information_schema中的表,并显示出VIEWS表的字段结构属性信息
(1) 选中目标数据库

(2) 使用desc查看表格结构(也可以使用show create table 表名;)

2:创建一个offcn数据库,并创建一个students表,字段为id,name,age,phone,height
首先创建offcn数据库

接下来创建student

3:查看students表的表结构

4:在上题创建的students表中,随意插入5条数据

5:查询所有创建的数据

6:将students表名修改为students_details

7:将students_details中height字段删除

8:在students_details里添加一个新字段,字段名为sex,并增加两条数据。
添加sex字段

添加数据:

9:删除students_details表

10:删除offcn数据库

163

被折叠的 条评论
为什么被折叠?



