SHOW-CATALOGS
Name
SHOW CATALOGS
Description
This statement is used for view created catalogs
Syntax:
1. SHOW CATALOGS [LIKE]
illustrate:
- LIKE: Fuzzy query can be performed according to the catalog name
Return result:
- CatalogId: Unique ID of the catalog
- CatalogName: Catalog name. where “internal” is the default built-in catalog, which cannot be modified.
- Type: Catalog type.
- IsCurrent: Show yes on the line of current using catalog.
Example
- View all created catalogs
1. SHOW CATALOGS;
2. +-----------+-------------+----------+-----------+
3. | CatalogId | CatalogName | Type | IsCurrent |
4. +-----------+-------------+----------+-----------+
5. | 130100 | hive | hms | |
6. | 0 | internal | internal | yes |
7. +-----------+-------------+----------+-----------+
``` 2. Fuzzy query by catalog name
1. SHOW CATALOGS LIKE 'hi%';
2. +-----------+-------------+----------+-----------+
3. | CatalogId | CatalogName | Type | IsCurrent |
4. +-----------+-------------+----------+-----------+
5. | 130100 | hive | hms | |
6. +-----------+-------------+----------+-----------+
```
Keywords
SHOW, CATALOG, CATALOGS
