This topic has not yet been rated - Rate this topic

ALTER USER (Windows Azure SQL Database)

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.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.
facebook page visit twitter rss feed newsletter