---
sidebar_position: 1
title: DATABASES view
description: Query the DATABASES view to list all databases you have created in MotherDuck.
---
# DATABASES view

The `MD_INFORMATION_SCHEMA.DATABASES` view provides information about the current databases that the user created.

## Schema

When you query the `MD_INFORMATION_SCHEMA.DATABASES` view, the query results contain one row for each database that the current user created.

The `MD_INFORMATION_SCHEMA.DATABASES` view has the following schema:

| Column Name | Data Type | Value                             |
|-------------|-----------|-----------------------------------|
| NAME        | STRING    | The name or alias of the database |
| UUID        | STRING    | The UUID of the database          |
| CREATED_TS  | TIMESTAMP | The database’s creation time |
| TRANSIENT   | BOOLEAN   | Whether the database is transient |
| HISTORICAL_SNAPSHOT_RETENTION | INTERVAL | Period of time the database's snapshots are retained after becoming inactive |
| TYPE        | STRING    | Database type (ducklake or default) |

## Example usage

```sql
from MD_INFORMATION_SCHEMA.DATABASES;
```

|         name         |                 uuid                 |       created_ts       | transient | historical_snapshot_retention |   type   |
|----------------------|--------------------------------------|------------------------|-----------|-------------------------------|----------|
| tpch_sf1000_template | 2c80b37d-d307-44d8-aff6-33ea2294bd35 | 2024-10-21 14:26:30-04 |   false   |          00:00:00             | default  |
| db1                  | 445864c7-5758-42a2-9a5c-2f16620ebc9f | 2024-09-15 09:32:05-04 |   false   |          1 day                | default  |
| foo                  | 4d829a9e-e0da-408c-aafa-0fc50186a588 | 2024-09-03 13:32:10-04 |   false   |          1 day                | default  |
| tpch_sf1000          | fc4bf9f4-80d1-4fd9-b6fe-d6d71f40ef42 | 2024-10-21 14:26:30-04 |   false   |          1 day                | default  |
