# MD_VERSION


> Inspect the loaded MotherDuck extension version and build hash.

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 `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fsql-reference%2Fmotherduck-sql-reference%2Fmd-version%2F&page_title=MD_VERSION&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

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