Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These statements provide a way to query the Hive metastore for existing data and metadata accessible to this Hive system.

Show Databases

Code Block

SHOW (DATABASES|SCHEMAS) [LIKE identifier_with_wildcards];

SHOW DATABASES lists all of the databases defined in the metastore. The optional LIKE clause allows the list of databases to be filtered using a regular expression. The regular expression may only contain '' for any characters or '|' for a choice. Examples are 'employees', 'emp', "emp*|*ees', all of which will match the database named 'employees'.

Show Tables

Code Block
SHOW TABLES identifier_with_wildcards

...