---
sidebar_position: 1
title: SHOW ALL DATABASES
description: List all MotherDuck, DuckDB, and shared databases.
---
# SHOW ALL DATABASES

The `SHOW ALL DATABASES` statement shows all databases, would it be MotherDuck database, DuckDB database or MotherDuck shares.

It returns:

* `alias` (`db_name` or `share_alias`)
* `is_attached` flag to mention if the database is attached or not.
* `type` (e.g. DuckDB, MotherDuck, MotherDuck share)
* `fully_qualified_name` (empty, md:_share/ or md:db_name)

To query specific columns, you can use the table function `MD_ALL_DATABASES()`.

# Syntax

```sql
SHOW ALL DATABASES;
```

or using the table function

```sql
select * from MD_ALL_DATABASES();
```

# Example usage

```sql
SHOW ALL DATABASES;
```

Example output:

```bash
┌──────────────────────────────────────────┬─────────────┬──────────────────┬─────────────────────────────────────────────────────────────────────────────────────────┐
│                  alias                   │ is_attached │       type       │                                  fully_qualified_name                                   │
│                 varchar                  │   boolean   │     varchar      │                                         varchar                                         │
├──────────────────────────────────────────┼─────────────┼──────────────────┼─────────────────────────────────────────────────────────────────────────────────────────┤
│ TEST_DB_02d6fc2158094bd693b6f285dbd402f7 │ true        │ motherduck       │ md:TEST_DB_02d6fc2158094bd693b6f285dbd402f7                                             │
│ TEST_DB_62b53d968a4f4b6682ed117a7251b814 │ true        │ motherduck       │ md:TEST_DB_62b53d968a4f4b6682ed117a7251b814                                             │
│ base                                     │ false       │ motherduck       │ md:base                                                                                 │
│ base2                                    │ true        │ motherduck       │ md:base2                                                                                │
│ db1                                      │ false       │ motherduck       │ md:db1                                                                                  │
│ integration_test_001                     │ false       │ motherduck       │ md:integration_test_001                                                                 │
│ my_db                                    │ true        │ motherduck       │ md:my_db                                                                                │
│ my_share_1                               │ true        │ motherduck share │ md:_share/integration_test_001/18d6dbdb-e130-4cdf-97c4-60782ed5972b                     │
│ sample_data                              │ false       │ motherduck       │ md:sample_data                                                                          │
│ source_db                                │ true        │ motherduck       │ md:source_db                                                                            │
│ test_db_115                              │ false       │ motherduck       │ md:test_db_115                                                                          │
│ test_db_28d                              │ false       │ motherduck       │ md:test_db_28d                                                                          │
│ test_db_cc9                              │ false       │ motherduck       │ md:test_db_cc9                                                                          │
│ test_share                               │ true        │ motherduck share │ md:_share/source_db/b990b424-2f9a-477a-b216-680a22c3f43f                                │
│ test_share_002                           │ true        │ motherduck share │ md:_share/integration_test_001/06cc5500-e49a-4f62-9203-105e89a4b8ae                     │
├──────────────────────────────────────────┴─────────────┴──────────────────┴─────────────────────────────────────────────────────────────────────────────────────────┤
│ 15 rows (15 shown)                                                                                                                                        4 columns │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

```


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `POST https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

Payload:

```json
{
  "page_path": "/sql-reference/motherduck-sql-reference/show-databases/",
  "page_title": "SHOW ALL DATABASES",
  "text": "<the user's feedback, max 2000 characters>",
  "source": "<optional identifier for your interface, for example 'claude.ai' or 'chatgpt'>"
}
```

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed payloads, and `429` when rate-limited.
