The COLUMN_PRIVILEGES table provides
information about column privileges. This information comes from
the mysql.columns_priv grant table.
INFORMATION_SCHEMA Name | SHOW Name | Remarks |
|---|---|---|
GRANTEE | '
value | |
TABLE_CATALOG | def | |
TABLE_SCHEMA | ||
TABLE_NAME | ||
COLUMN_NAME | ||
PRIVILEGE_TYPE | ||
IS_GRANTABLE |
Notes:
In the output from
SHOW FULL COLUMNS, the privileges are all in one field and in lowercase, for example,select,insert,update,references. InCOLUMN_PRIVILEGES, there is one privilege per row, in uppercase.PRIVILEGE_TYPEcan contain one (and only one) of these values:SELECT,INSERT,UPDATE,REFERENCES.If the user has
GRANT OPTIONprivilege,IS_GRANTABLEshould beYES. Otherwise,IS_GRANTABLEshould beNO. The output does not listGRANT OPTIONas a separate privilege.
The following statements are not equivalent:
SELECT ... FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES SHOW GRANTS ...