您的当前位置:首页正文

mysql如何查看数据库名

来源:花图问答

具体方法:

(推荐教程:)

1、查看所有的数据库,等同于select schema_name from information_schema.schemata\G。\G 替换

show databases;

等同于

select schema_name from information_schema.schemata\G

2、status 查看mysql数据库的运行状态

3、查看数据库中的表

show tables

同样也可以在information_schema中查看,show命令是方便使用的简短模式。

select table_name from tables where table_schema='jblog';

4、查看表结构

desc  table_name;

5、查看表状态

show table status from db like 条件

可以查看engine数据库引擎,version,row、index等信息。