HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

ALTER DATABASE

Function

ALTER DATABASE modifies a database, including its name, owner, connection limitation, and object isolation.

Modifies the attributes of the schema. Meaning for the mode only when the default character set and character order are modified.

Precautions

Compared to the original MogDB, dolphin's changes to the ALTER DATABASE syntax are:

  • Add modifiable items [ [DEFAULT] CHARACTER SET | CHARSET [ = ] default_charset ] [ [DEFAULT] COLLATE [ = ] default_collation ].

Syntax

  • Modifying the default character set and character order of SCHEMA

    ALTER DATABASE schema_name [ [DEFAULT] CHARACTER SET | CHARSET [ = ] default_charset ] [ [DEFAULT] COLLATE [ = ] default_collation ];

    imgNote:

    • With B compatibility, this syntax is only supported if dolphin.b_compatibility_mode is on.
    • When you use this syntax, the syntax is equivalent to ALTER SCHEMA.

Parameter Description

  • schema_name

    The name of the database where the attribute needs to be modified.

    Value range: string, to conform to the naming convention of the identifier.

  • [ [DEFAULT] CHARACTER SET | CHARSET [ = ] default_charset ]

    Specifies the default character set for the pattern. When specified alone, the default character order of the pattern is set to the default character order of the specified character set.

  • [ [DEFAULT] COLLATE [ = ] default_collation ]

    Specifies the default character order of the pattern. When specified alone, the default character set of the pattern is set to the character set corresponding to the specified character order.

Examples

See Examples for CREATE DATABASE.

CREATE DATABASE, DROP DATABASE

Copyright © 2011-2024 www.enmotech.com All rights reserved.