Categories:

Organization user and organization user group functions

IS_ORGANIZATION_USER

Returns TRUE if the argument is a Snowflake user who is an organization user.

语法

IS_ORGANIZATION_USER( <exp> )

实参

exp

解析为 Snowflake 用户对象名称的表达式。

If passing in the literal name of a user, surround it with single quotes (for example, 'joe').

返回

如果实参是组织用户,则返回 TRUE。

使用说明

在数据共享上下文中,如果使用者账户与提供商账户属于 不同的组织,则调用该函数时会返回 NULL。从与提供商所在的 同一组织 中的使用者账户调用该函数将返回 TRUE 或 FALSE。

示例

Determine if the user joe in the current account is an organization user:

SELECT IS_ORGANIZATION_USER('joe');

确定会话中的当前用户是否为组织用户:

SELECT IS_ORGANIZATION_USER(CURRENT_USER());