impala查询所有表名
- 作者: 嗷嗷de奥特曼
- 来源: 51数据库
- 2020-09-26
查找所有表的语句
select table_name?
from information_schema.tables?
where table_schema='当前数据库'
mysql> ?use mysql
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql ? ? ? ? ? |
+---------------------------+
| columns_priv ? ? ? ? ? ? ?|
| db ? ? ? ? ? ? ? ? ? ? ? ?|
| event ? ? ? ? ? ? ? ? ? ? |
| func ? ? ? ? ? ? ? ? ? ? ?|
| general_log ? ? ? ? ? ? ? |
| help_category ? ? ? ? ? ? |
| help_keyword ? ? ? ? ? ? ?|
| help_relation ? ? ? ? ? ? |
| help_topic ? ? ? ? ? ? ? ?|
| innodb_index_stats ? ? ? ?|
| innodb_table_stats ? ? ? ?|
| ndb_binlog_index ? ? ? ? ?|
| plugin ? ? ? ? ? ? ? ? ? ?|
| proc ? ? ? ? ? ? ? ? ? ? ?|
| procs_priv ? ? ? ? ? ? ? ?|
| proxies_priv ? ? ? ? ? ? ?|
| 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 ? ? ? ? ? ? ? ? ? ? ?|
+---------------------------+
28 rows in set (0.05 sec)
show tables即为显示当前数据库中所有的表。
根据具体问题类型,进行步骤拆解/原因原理分析/内容拓展等。
具体步骤如下:/导致这种情况的原因主要是……
select table_name from information_schema.tables where table_schema = '数据库名'
新建个视图 将语句放入 然后正常导出
select table_name?
from information_schema.tables?
where table_schema='当前数据库'
mysql> ?use mysql
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql ? ? ? ? ? |
+---------------------------+
| columns_priv ? ? ? ? ? ? ?|
| db ? ? ? ? ? ? ? ? ? ? ? ?|
| event ? ? ? ? ? ? ? ? ? ? |
| func ? ? ? ? ? ? ? ? ? ? ?|
| general_log ? ? ? ? ? ? ? |
| help_category ? ? ? ? ? ? |
| help_keyword ? ? ? ? ? ? ?|
| help_relation ? ? ? ? ? ? |
| help_topic ? ? ? ? ? ? ? ?|
| innodb_index_stats ? ? ? ?|
| innodb_table_stats ? ? ? ?|
| ndb_binlog_index ? ? ? ? ?|
| plugin ? ? ? ? ? ? ? ? ? ?|
| proc ? ? ? ? ? ? ? ? ? ? ?|
| procs_priv ? ? ? ? ? ? ? ?|
| proxies_priv ? ? ? ? ? ? ?|
| 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 ? ? ? ? ? ? ? ? ? ? ?|
+---------------------------+
28 rows in set (0.05 sec)
show tables即为显示当前数据库中所有的表。
根据具体问题类型,进行步骤拆解/原因原理分析/内容拓展等。
具体步骤如下:/导致这种情况的原因主要是……
select table_name from information_schema.tables where table_schema = '数据库名'
新建个视图 将语句放入 然后正常导出
推荐阅读
