Documentation Home
MySQL 8.3 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.8Mb
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 294.0Kb
Man Pages (Zip) - 409.0Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

MySQL 8.3 Reference Manual  /  ...  /  The INFORMATION_SCHEMA SCHEMATA_EXTENSIONS Table

28.3.32 信息架构SCHEMATA_EXTENSIONS表

SCHEMATA_EXTENSIONS表扩展了SCHEMATA表,提供了关于架构选项的信息。

SCHEMATA_EXTENSIONS表具有以下列:

  • CATALOG_NAME

    所属目录的名称。该值始终为def

  • SCHEMA_NAME

    架构的名称。

  • OPTIONS

    架构的选项。如果架构是只读的,则值包含READ ONLY=1。如果架构不是只读的,则不出现READ ONLY选项。

示例

mysql> ALTER SCHEMA mydb READ ONLY = 1;
mysql> SELECT * FROM INFORMATION_SCHEMA.SCHEMATA_EXTENSIONS
       WHERE SCHEMA_NAME = 'mydb';
+--------------+-------------+-------------+
| CATALOG_NAME | SCHEMA_NAME | OPTIONS     |
+--------------+-------------+-------------+
| def          | mydb        | READ ONLY=1 |
+--------------+-------------+-------------+

mysql> ALTER SCHEMA mydb READ ONLY = 0;
mysql> SELECT * FROM INFORMATION_SCHEMA.SCHEMATA_EXTENSIONS
       WHERE SCHEMA_NAME = 'mydb';
+--------------+-------------+---------+
| CATALOG_NAME | SCHEMA_NAME | OPTIONS |
+--------------+-------------+---------+
| def          | mydb        |         |
+--------------+-------------+---------+

注意