Categories:

Context Functions (Session)

CURRENT_ACCOUNT¶

Returns the account locator used by the user’s current session.

Note

If you want to find the account name rather than the account locator, use CURRENT_ACCOUNT_NAME instead. The preferred account identifier (orgname-account_name) uses the account name, not the account locator.

Syntax¶

CURRENT_ACCOUNT()
Copy

Arguments¶

None.

Returns¶

The data type of the returned value is VARCHAR.

Examples¶

This shows how to call the CURRENT_ACCOUNT function:

SELECT CURRENT_ACCOUNT();
Copy

Output:

+-------------------+
| CURRENT_ACCOUNT() |
|-------------------|
| XY12345           |
+-------------------+
Copy