
一、查询所有表
1、查询当前数据库所有表
首先进入数据库itheima:
useitheima ;
查看itheima数据库的所有表:
show tables;
------该数据库是新建的,下面没有表
切换到sys数据库,查看sys下的所有表:

2、查询表结构、查询指定表的建表语句 待讲完创建表后再看

二、创建
案例:

1、首先进入新创建的数据库itcast(不要对4个系统数据库做任何操作)
useitcast**;**

2、 输入命令
create table tb_user(
id int comment '编号',
name varchar(50) comment '姓名',
age int comment '年龄',
gender varchar(1) comment '性别'
) comment '用户表';

3、查看itcast下的所有表:
show tables;

三、查询
1、查询表结构(没有comment字段)
desctb_user ;

2、查询指定表的建表语句
show create tabletb_user ;
