品易云推流 关闭
文章详情页
文章 > MySQL > mysql如何查看数据库名

mysql如何查看数据库名

头像

FXL

2020-09-04 09:18:587433浏览 · 0收藏 · 0评论

具体方法:

(推荐教程: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等信息。

关注

关注公众号,随时随地在线学习

本教程部分素材来源于网络,版权问题联系站长!

底部广告图