Updated on 2026-11-06 GMT+08:00

Bind Role

Function

Binds a user and a role.

Syntax

GRANT (role_name,...) TO (user_name,...);

Keywords

None.

Precautions

The role_name and user_name must exist. Otherwise, an error is reported.

Example

GRANT role1 TO user_name1;