List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:January 28 2002 10:32pm
Subject:Re: Grant Permission Syntax/Qualifier for Column?
View as plain text  
In the last episode (Jan 28), Nic Plum said:
> It looks to be possible to set a permission on a column in a table.
> 
> If this is true, what is the syntax with respect to qualifying the name -
> for a table it would be databasename.tablename but
> databasename.tablename.columnname doesn't appear to work for a column?

From the docs ( http://www.mysql.com/doc/G/R/GRANT.html ):

     GRANT priv_type [(column_list)] [, priv_type [(column_list)] ...]
         ON {tbl_name | * | *.* | db_name.*}
         TO user_name [IDENTIFIED BY 'password']
             [, user_name [IDENTIFIED BY 'password'] ...]
         [REQUIRE
                [{SSL| X509}]
        [CIPHER cipher [AND]]
        [ISSUER issuer [AND]]
        [SUBJECT subject]]
         [WITH GRANT OPTION]

The only `priv_type' values you can specify for a column (that is, when
you use a `column_list' clause) are `SELECT', `INSERT', and `UPDATE'.
 
-- 
	Dan Nelson
	dnelson@stripped
Thread
Grant Permission Syntax/Qualifier for Column?Nic Plum28 Jan
  • Re: Grant Permission Syntax/Qualifier for Column?Dan Nelson28 Jan