

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 列出資料庫並搜尋指定的資料庫
<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 | 