mysql如何查看数据库名

1,099次阅读
没有评论

mysql如何查看数据库名

具体方法:

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

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:Python教程2022-10-19发表,共计421字。
新手QQ群:570568346,欢迎进群讨论 Python51学习