1、在windows的客户端进入MySQL后,用命令“ show database; ”可以查看所有的数据表。
打开指定的库:use 库名
查看当前库的所有表:show tables;
查看其他库的所有表:select tables from 库名;
2、查看我当前在哪个库里:
select database();
3、当前test库中没有表,我们可以建一张表。
create table stuinfo(
-> id int ,
-> name varchar(20));
4、观察表的结构:
desc 表名;
5、查询表中的数据:
6、插入数据:
总合: