文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 28 个 INFORMATION_SCHEMA 表 / 28.3 INFORMATION_SCHEMA 总表 / 28.3.10 INFORMATION_SCHEMA COLUMN_PRIVILEGES 表
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 76%

28.3.10 INFORMATION_SCHEMA COLUMN_PRIVILEGES 表28.3.10 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table

COLUMN_PRIVILEGES 表提供有关列权限的信息。它的值来自 mysql.columns_priv 系统表。The COLUMN_PRIVILEGES table provides information about column privileges. It takes its values from the mysql.columns_priv system table.

COLUMN_PRIVILEGES 表有以下列:The COLUMN_PRIVILEGES table has these columns:

  • GRANTEE

    授予权限的账户名称,格式为 'user_name'@'host_name'。The name of the account to which the privilege is granted, in 'user_name'@'host_name' format.

  • TABLE_CATALOG

    包含该列的表所属的目录名称。此值始终为 def。The name of the catalog to which the table containing the column belongs. This value is always def.

  • TABLE_SCHEMA

    包含该列的表所属的模式(数据库)名称。The name of the schema (database) to which the table containing the column belongs.

  • TABLE_NAMETABLE_NAME

    包含该列的表名称。The name of the table containing the column.

  • COLUMN_NAMECOLUMN_NAME

    列名称。The name of the column.

  • PRIVILEGE_TYPE

    授予的权限。该值可以是任何可以在列级别授予的权限;参见 第 15.7.1.6 节,“GRANT 语句”。每行列出一个权限,因此每个受赠者持有的列权限都有一行。The privilege granted. The value can be any privilege that can be granted at the column level; see Section 15.7.1.6, “GRANT Statement”. Each row lists a single privilege, so there is one row per column privilege held by the grantee.

    在 SHOW FULL COLUMNS 的输出中,权限都在一列中,并且为小写,例如 select,insert,update,references。在 COLUMN_PRIVILEGES 中,每行只有一个权限,并且为大写。In the output from SHOW FULL COLUMNS, the privileges are all in one column and in lowercase, for example, select,insert,update,references. In COLUMN_PRIVILEGES, there is one privilege per row, in uppercase.

  • IS_GRANTABLE

    YES 如果用户拥有 GRANT OPTION 权限,否则为 NO。输出不会将 GRANT OPTION 显示为单独的行,且 PRIVILEGE_TYPE='GRANT OPTION'。YES if the user has the GRANT OPTION privilege, NO otherwise. The output does not list GRANT OPTION as a separate row with PRIVILEGE_TYPE='GRANT OPTION'.

注释Notes

下面的语句 不 等效:The following statements are not equivalent:

SELECT ... FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES

SHOW GRANTS ...