English 中文(简体)
HCatalog - Show Tables
  • 时间:2024-11-03

HCatalog - Show Tables


Previous Page Next Page  

You often want to pst all the tables in a database or pst all the columns in a table. Obviously, every database has its own syntax to pst the tables and columns.

Show Tables statement displays the names of all tables. By default, it psts tables from the current database, or with the IN clause, in a specified database.

This chapter describes how to pst out all tables from the current database in HCatalog.

Show Tables Statement

The syntax of SHOW TABLES is as follows −

SHOW TABLES [IN database_name] [ identifier_with_wildcards ];

The following query displays a pst of tables −

./hcat –e "Show tables;"

On successful execution of the query, you get to see the following response −

OK
emp
employee
Time taken: 5.3 seconds
Advertisements