

# 列出数据库并搜索指定的数据库
<a name="querying-glue-catalog-querying-available-databases-including-rdbms"></a>

本节中的示例演示如何按模式名称列出元数据中的数据库。

**Example – 列出数据库**  
以下示例查询列出 `information_schema.schemata` 表中的数据库。  

```
SELECT schema_name
FROM   information_schema.schemata
LIMIT  10;
```
下表显示了示例结果。  


****  

|  |  | 
| --- |--- |
| 6 | alb-databas1 | 
| 7 | alb\$1original\$1cust | 
| 8 | alblogsdatabase | 
| 9 | athena\$1db\$1test | 
| 10 | athena\$1ddl\$1db | 

**Example – 搜索指定的数据库**  
在以下示例查询中，`rdspostgresql` 是示例数据库。  

```
SELECT schema_name
FROM   information_schema.schemata
WHERE  schema_name = 'rdspostgresql'
```
下表显示了示例结果。  


****  

|  | schema\$1name | 
| --- | --- | 
| 1 | rdspostgresql | 