显示MYSQL数据库信息

显示所有的数据库:
show databases 

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

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

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

 show table status from DatabaseName where comment='view';
select * from information_schema.tables where table_schema='yourDatabaseName' and table_type='view';

 

posted on 2015-09-30 17:03  帅胡  阅读(355)  评论(0编辑  收藏  举报

导航