# MD_USER


> Return the current MotherDuck user name.

`MD_USER()` returns the current MotherDuck user name for the active connection.

In MotherDuck sessions, `USER`, `CURRENT_USER()`, and `SESSION_USER` resolve to the same value.

To also get the user ID, organization details, plan type, and region, use [`MD_USER_INFO()`](md-user-info.md).

## Syntax

```sql
SELECT md_user();

-- Equivalent aliases in a MotherDuck session
SELECT user;
SELECT user();
SELECT current_user();
SELECT session_user;
```

::::info
Note that DuckDB and MotherDuck allow you to use niladic (no-argument) functions like `user` also as a column name. This can lead to a silent failure with unexpected values when dropping a `user` column.
::::

## Output

| Column Name | Data Type | Value |
|-------------|-----------|-------|
| `md_user()` | VARCHAR | Current MotherDuck user name |

## Example usage

```sql
SELECT md_user();
```

```sql
SELECT current_user();
```

:::note
If you are not connected to MotherDuck, DuckDB may return its default local user instead.
:::


---

## 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-user%2F&page_title=MD_USER&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.
