SalesBuy
1-855-856-7678
Technical SupportSupport
Renames a database user or changes its default schema.
Syntax Conventions (Windows Azure SQL Database)
ALTER USER userName
WITH <set_item> [ ,...n ]
<set_item> ::=
NAME =newUserName
| DEFAULT_SCHEMA =schemaName
| LOGIN = loginName
This syntax diagram demonstrates the supported arguments and options in Windows Azure SQL Database.
If the ALTER USER statement is the only statement in a SQL batch, Windows Azure SQL Database supports the WITH LOGIN clause. If the ALTER USER statement is not the only statement in a SQL batch or is executed in dynamic SQL, the WITH LOGIN clause is not supported.
When used while connected to a federation member, the following syntax is supported:
ALTER USER userName
WITH <set_item> [ ,…n ]
[;]
<set_item> ::=
NAME = newUserName
For more information about the arguments and the ALTER USER statement, see ALTER USER in SQL Server Books Online.
Requires ALTER ANY USER permission on the database.