mysql查询数据库中有多少表的方法
这篇文章主要介绍mysql查询数据库中有多少表的方法,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
mysql中可以使用show tables或show tables from database_name命令查看当前数据库中有多少数据表。
查询数据库中表的方法步骤:
1、使用show databases查看有哪些数据库。
2、指定要查询的数据库
使用下面的命令即可:
USE<数据库名>
3、使用show tables或show tables from database_name命令查看数据库中有多少表。
示例:
mysql>showdatabases;+--------------------+|Database|+--------------------+|information_schema||mysql||performance_schema||sys|+--------------------+4rowsinset(0.00sec)mysql>usemysql;ReadingtableinformationforcompletionoftableandcolumnnamesYoucanturnoffthisfeaturetogetaquickerstartupwith-ADatabasechangedmysql>showtables;+---------------------------+|Tables_in_mysql|+---------------------------+|columns_priv||component||db||default_roles||engine_cost||func||general_log||global_grants||gtid_executed||help_category||help_keyword||help_relation||help_topic||innodb_index_stats||innodb_table_stats||password_history||plugin||procs_priv||proxies_priv||role_edges||server_cost||servers||slave_master_info||slave_relay_log_info||slave_worker_info||slow_log||tables_priv||time_zone||time_zone_leap_second||time_zone_name||time_zone_transition||time_zone_transition_type||user|+---------------------------+33rowsinset(0.01sec)
以上是mysql查询数据库中有多少表的方法的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。