---
title: MD_VERSION
description: Inspect the loaded MotherDuck extension version and build hash.
---

# MD_VERSION

MotherDuck exposes `MD_VERSION` both as a scalar function and as a pragma.

Use the scalar function when you only need the version string. Use the pragma when you also want the extension hash.

## Syntax

```sql
SELECT md_version();

PRAGMA md_version;
```

## Output

`SELECT md_version();` returns a single `VARCHAR` value.

`PRAGMA md_version;` returns:

| Column Name | Data Type | Value |
|-------------|-----------|-------|
| `md_extension_version` | VARCHAR | Loaded MotherDuck extension version |
| `md_extension_hash` | VARCHAR | MotherDuck extension build hash |

## Example usage

```sql
SELECT md_version();
```

```sql
PRAGMA md_version;
```


---

## 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/md-version/",
  "page_title": "MD_VERSION",
  "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.
