Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all hive databases being in use or created so far?

Tags:

Similar to SHOW TABLES command, do we have any such command to list all databases created so far?

like image 926
Raja Reddy Avatar asked Nov 05 '13 04:11

Raja Reddy


1 Answers

This page mentions the command SHOW DATABASES.

From the manual:

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. Wildcards in the regular expression can only be '' for any character(s) or '|' for a choice. Examples are 'employees', 'emp', 'emp*|*ees', all of which will match the database named 'employees'.

like image 112
Ray Toal Avatar answered Oct 10 '22 16:10

Ray Toal