Skip to main content

SHOW DATABASES

Introduced or updated: v1.2.290

显示实例上存在的数据库列表。

另请参阅:system.databases

语法

SHOW [ FULL ] DATABASES 
[ LIKE '<pattern>' | WHERE <expr> ]
参数描述
FULL列出包含附加信息的结果。 有关更多详细信息,请参见示例
LIKE使用区分大小写的模式匹配按名称过滤结果。
WHERE使用 WHERE 子句中的表达式过滤结果。

示例

SHOW DATABASES;

┌──────────────────────┐
│ databases_in_default │
├──────────────────────┤
│ canada │
│ china │
default
│ information_schema │
│ system │
│ test │
└──────────────────────┘

SHOW FULL DATABASES;

┌───────────────────────────────────────────────────┐
│ catalog │ owner │ databases_in_default │
├─────────┼──────────────────┼──────────────────────┤
default │ account_admin │ canada │
default │ account_admin │ china │
defaultNULLdefault
defaultNULL │ information_schema │
defaultNULL │ system │
default │ account_admin │ test │
└───────────────────────────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today