---
title: "USER"
description: "The USER SQL function gets the user log on code."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/user
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/user
updated: 2026-09-04T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> USER[USER]:::quoted
    USER --> End((END))
```

## Purpose
The `USER` SQL function gets the user log on code.

Returns: the user log on code.

## Examples
The following example retrieves the log on code of the current user; the actual value depends on the user logged on:
```sql
select user

-------------------
john.doe@acme.eu
```