| valign='top' | '''Summary'''
|Alters the <code>[name]</code> of a database to <code>[newname]</code>.
|-
| valign='top' | '''Errors'''
|The command fails if one of the specified database names is invalid, if the target database exists already, if the source database is not found or currently locked, or if it cannot be renamed for some other reason.
|-
| valign='top' | '''Examples'''
* <code>ALTER DATABASE db tempdb</code><br/>renames the database <code>db</code> into <code>tempdb</code>.
|}
==ALTER USER==
{|