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授予权限的账户名称,格式为
'。The name of the account to which the privilege is granted, inuser_name'@'host_name''format.user_name'@'host_name'TABLE_CATALOG包含该列的表所属的目录名称。此值始终为
def。The name of the catalog to which the table containing the column belongs. This value is alwaysdef.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 fromSHOW FULL COLUMNS, the privileges are all in one column and in lowercase, for example,select,insert,update,references. InCOLUMN_PRIVILEGES, there is one privilege per row, in uppercase.IS_GRANTABLEYES如果用户拥有GRANT OPTION权限,否则为NO。输出不会将GRANT OPTION显示为单独的行,且PRIVILEGE_TYPE='GRANT OPTION'。YESif the user has theGRANT OPTIONprivilege,NOotherwise. The output does not listGRANT OPTIONas a separate row withPRIVILEGE_TYPE='GRANT OPTION'.
注释Notes
COLUMN_PRIVILEGES是一个非标准的INFORMATION_SCHEMA表。COLUMN_PRIVILEGESis a nonstandardINFORMATION_SCHEMAtable.
下面的语句 不 等效:The following statements are not equivalent:
SELECT ... FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES SHOW GRANTS ...