

# 列出指定数据库中的表并按名称搜索表
<a name="querying-glue-catalog-listing-tables"></a>

要列出表的元数据，您可以按表架构或表名进行查询。

**Example – 按架构列出表**  
以下查询列出了使用 `rdspostgresql` 表架构的表。  

```
SELECT table_schema,
       table_name,
       table_type
FROM   information_schema.tables
WHERE  table_schema = 'rdspostgresql'
```
下图显示了一个示例结果。  


****  

|  | table\$1schema | table\$1name | table\$1type | 
| --- | --- | --- | --- | 
| 1 | rdspostgresql | rdspostgresqldb1\$1public\$1account | BASE TABLE | 

**Example – 按名称搜索表**  
以下查询获取表 `athena1` 的元数据信息。  

```
SELECT table_schema,
       table_name,
       table_type
FROM   information_schema.tables
WHERE  table_name = 'athena1'
```
下图显示了一个示例结果。  


****  

|  | table\$1schema | table\$1name | table\$1type | 
| --- | --- | --- | --- | 
| 1 | 默认 | athena1 | BASE TABLE | 