ALTER DATABASE

Updates the configuration of the specified database.

ALTER DATABASE DESCRIPTION

Syntax

ALTER DATABASE <database_name> WITH
    [DESCRIPTION = <description>]

Parameters

Parameter Description
<database_name> The name of the database to be altered.
<description> The description of the database.

Example

The following example alters a description of the database:

ALTER DATABASE my_database WITH DESCRIPTION = 'Database for query management';

ALTER DATABASE RENAME TO

Renames the specified database.

Syntax

ALTER DATABASE <database_name> RENAME TO <new_database_name>

Parameters

Parameter Description
<database_name> The name of the database to rename.
<new_database_name> The new name of the database.

ALTER DATABASE OWNER TO

Change the owner of a database. The current owner of a database can be viewed in the information_schema.catalogs view on catalog_owner column.

check ownership page for more info.

Syntax

ALTER DATABASE <database_name> OWNER TO <user>

Parameters

Parameter Description
<database_name> The name of the database to change the owner of.
<user> The new owner of the database.