TABLE_PRIVILEGES 表提供有关表权限的信息。它的值取自 mysql.tables_priv 系统表。The TABLE_PRIVILEGES table provides
information about table privileges. It takes its values from the
mysql.tables_priv system table.
TABLE_PRIVILEGES 表具有以下列:The TABLE_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 belongs. This value is alwaysdef.TABLE_SCHEMA表所属的模式(数据库)名称。The name of the schema (database) to which the table belongs.
TABLE_NAMETABLE_NAME表的名称。The name of the table.
PRIVILEGE_TYPE授予的权限。值可以是任何可以在表级授予的权限;参见 第 15.7.1.6 节,“GRANT 语句”。每行列出一个权限,因此每个受赠者拥有的表权限对应一行。The privilege granted. The value can be any privilege that can be granted at the table level; see Section 15.7.1.6, “GRANT Statement”. Each row lists a single privilege, so there is one row per table privilege held by the grantee.
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
TABLE_PRIVILEGES是一个非标准的INFORMATION_SCHEMA表。TABLE_PRIVILEGESis a nonstandardINFORMATION_SCHEMAtable.
下面的语句 不 等效:The following statements are not equivalent:
SELECT ... FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES SHOW GRANTS ...