Reference and syntax for the ALTER USER command.
Parameter | Description |
---|---|
<user_name> | The name of the user, may contain non-alpha-numeric characters such as exclamation points (!), percent signs (%), dots (.), underscores (_), dashes (-), and asterisks (*). Strings containing non-alphanumeric characters must be enclosed in single or double quotes. For more information about the full set of naming rules, see the object identifiers guide. |
<new_user_name> | The new name of the user, used with the RENAME TO option. The new user name can be any string, and can also contain spaces and non-alpha-numeric characters such as exclamation points (!), percent signs (%), at signs(@), dot signs (.), underscore signs (_), minus signs (-), and asterisks (*). If the string contains spaces or non-alphanumeric characters, it must be enclosed in single or double quotes. |
<login_name> | An optional, case-insensitive parameter to specify the name of the login to link the user with, used with the SET option. This cannot be used in conjunction with the SERVICE_ACCOUNT parameter - a user can be linked to a login OR a service account but not both. DEFAULT disassociates the user from its login. The user will become unusable before it’s re-associated with some login or service account. |
<service_account_name> | An optional parameter to specify the name of the service account to link the user with, used with the SET option. This cannot be used in conjunction with the LOGIN parameter - a user can be linked to a login OR a service account but not both. DEFAULT disassociates the user from its service account. The user will become unusable before it’s re-associated with some login or service account. |
<database_name> | An optional parameter to define a default database for the user. Used with the SET option. |
<engine_name> | An optional parameter to define a default engine for the user. Used with the SET option. |
information_schema.users
view on user_owner
column.
Check ownership page for more info.
Parameter | Description |
---|---|
<user_name> | The name of the user to change the owner of. |
<user> | The new owner of the user. |