Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.22 KB

sql-statement-alter-database.md

File metadata and controls

37 lines (25 loc) · 1.22 KB
title summary category aliases
ALTER DATABASE | TiDB SQL Statement Reference
An overview of the usage of ALTER DATABASE for the TiDB database.
reference
/docs/v4.0/sql-statements/sql-statement-alter-database/
/docs/stable/reference/sql/statements/alter-database/

ALTER DATABASE

ALTER DATABASE is used to specify or modify the default character set and collation of the current database. ALTER SCHEMA has the same effect as ALTER DATABASE.

语法图

AlterDatabaseStmt:

AlterDatabaseStmt

DatabaseOption:

DatabaseOption

Examples

ALTER {DATABASE | SCHEMA} [db_name]
    alter_specification ...
alter_specification:
    [DEFAULT] CHARACTER SET [=] charset_name
  | [DEFAULT] COLLATE [=] collation_name

The alter_specification option specifies the CHARACTER SET and COLLATE of a specified database. Currently, TiDB only supports some character sets and collations. See Character Set and Collation Support for details.

See also