您的位置:首页 > 博客中心 > 数据库 >

显示MYSQL数据库信息

时间:2022-03-14 15:05

显示所有的数据库:
show databases 

显示一个数据库所有表用:
show tables from DatabaseName

SELECT table_name FROM information_schema.tables WHERE table_schema=‘DatabaseName‘ AND table_type=‘base table‘;

显示一个数据库中的所有视图:

 show table  from DatabaseName where comment=‘view‘;
select *  information_schema.tables where table_schema=‘yourDatabeName‘ and table_type=‘view‘;

 

本类排行

今日推荐

热门手游