ALTER USER

Updates an existing user's default role or comment.

Category: securityPrivilege: ManageUsersDeltaForge extension

Syntax

ALTER USER <name> [SET]
  [DEFAULT_ROLE = <role>]
  [COMMENT '<description>']

Description

## Overview ALTER USER updates mutable attributes of an existing user. Only DEFAULT_ROLE and COMMENT are changeable through SQL. The user's name and the underlying identity-provider link are managed elsewhere. ## Behavior - The user must already exist; otherwise the ALTER raises an error. - At least one of DEFAULT_ROLE or COMMENT must be supplied. ALTER USER with neither clause is rejected. - The SET keyword is optional and accepted for syntactic familiarity. Whether it is present or absent, the body is the same. - DEFAULT_ROLE must reference an existing role. Setting an unknown role fails at the Control Plane and leaves the user unchanged. - Partial updates are supported: changing only DEFAULT_ROLE leaves COMMENT alone, and vice versa. ## Access Control Requires the `ManageUsers` privilege. ## Compatibility DeltaForge extension.

Parameters

NameTypeDescription
nameSpecifies the user to alter. Must already exist.
default_roleSpecifies the new default role. The role must already exist.
commentSpecifies a new description. Pass an empty string to clear.

Examples

-- Change a user's default role
ALTER USER bob SET DEFAULT_ROLE = data_lead;
-- Update the comment without changing the default role
ALTER USER bob SET COMMENT 'Promoted 2026-04';
-- Both clauses at once
ALTER USER bob SET DEFAULT_ROLE = data_lead COMMENT 'Promoted 2026-04';

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →