常见命令
-
常用show命令
官网:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Show
-
Show databases
SHOW (DATABASES | SCHEMAS) [LIKE 'identifier'];
show databases; show databases like 'tpc*';
-
Show Tables
SHOW TABLES [IN database_name] ['identifier'];
show tables; show tables in default; show tables 'test*';
-
Show Views
参考
show tables
-
Show Partitions
SHOW PARTITIONS table_name [PARTITION(parttion_spec)];
show partitions test_partition;
-
Show Table/Partition Extended
SHOW TABLE EXTENDED [IN/FROM database_name] LIKE 'identifier' [PARTITION(partition_spec)];
show table extended like 'test_partition';
-
Show Create Table
SHOW CREATE TABLE ([db_name.]table_name|view_name);
show create table default.test_partition;
-
网友评论