mysql查询表中的数据库名的语法:“show databases”;
mysql查询表中的数据库名的方法:
1.查询所有数据库,sql语句为:“show databases;”
2.查询指定数据库中所有表名,sql语句为:
select table_name from information_schema.tables
where table_schema='database_name' and table_type='base table';
亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>
推荐阅读:mysql怎么查询数据库中的所有表名