ALTER USER (TSQL Statement)
changes the attributes of the specified user.
Syntax
ALTER USER user_name
WITH <option> [ ,...n ]
<option> ::=
NAME = new_user_name
| LOGIN = login_name
Arguments
- user_name
- is the user name.
NAME =
new_user_name- is the new name of the user.
LOGIN =
login_name- is the new login to which the user is mapped.
login_name cannot be sa (only user dbo can have sa as login).
Remarks
Only sa or dbo is allowed to execute this statement.
Examples
ALTER USER jean_pierre WITH NAME = jp;
ALTER USER jp WITH LOGIN = jpr;