ALTER ROLE

statementsupportedAccess control (grants, roles)

docs.snowflake.com ↗

Object: ROLE

Modifies the properties for an existing custom role. Currently, the only supported operations are renaming a role or adding/overwriting/removing a comment for a role.

Syntax

supportedpartialnot supportednot scored

ALTER ROLE [ IF EXISTS ] <name> RENAME TO <new_name>

ALTER ROLE [ IF EXISTS ] <name> SET COMMENT = '<string_literal>'

ALTER ROLE [ IF EXISTS ] <name> UNSET COMMENT

ALTER ROLE [ IF EXISTS ] <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]

ALTER ROLE [ IF EXISTS ] <name> UNSET TAG <tag_name> [ , <tag_name> ... ]

Parameters

NameRequiredDescription
nameSpecifies the identifier for the role to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
RENAME TO new_nameSpecifies the new identifier for the role; must be unique for your account. For more details, see Identifier requirements.
SET ...Specifies the properties to set for the role:
TAG tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ]Specifies the tag name and the tag string value. The tag value is always a string, and the maximum number of characters for the tag value is 256. For information about specifying tags in a statement, see Tag quotas.
COMMENT = 'string_literal'Adds a comment or overwrites an existing comment for the role.
UNSET ...Specifies the properties to unset for the role, which resets them to the defaults. TAG tag_name [ , tag_name ... ] COMMENT

Usage notes

See also

Referenced by