Re: revoke SELECT on a column [ MySQL 4.1 ] + column "Comment"

2007-02-09 Thread ViSolve DB Team

Hi,

The thing is you want to add "comments" to column, which is presently null, 
as per  SHOW FULL COLUMNS FROM ;


Then add " COMMENT 'your comment for the column name'  ", for the columns 
you want comments.


For Instance,

mysql> create table test
   (topic varchar(10)default null COMMENT 'topic for the forum',
   title varchar(10) default null COMMENT 'title for the forum 
topic');


mysql> show full columns from test\G
*** 1. row ***
Field: topic
 Type: varchar(10)
Collation: latin1_swedish_ci
 Null: YES
  Key:
  Default: NULL
Extra:
Privileges: select,insert,update,references
  Comment: topic for the forum
*** 2. row ***
Field: title
 Type: varchar(10)
Collation: latin1_swedish_ci
 Null: YES
  Key:
  Default: NULL
Extra:
Privileges: select,insert,update,references
  Comment: title for the forum topic
2 rows in set (0.01 sec)

Hope Useful  ! and Welcome for your interest.

Thanks
ViSolve DB Team.
- Original Message - 
From: "Gilles MISSONNIER" <[EMAIL PROTECTED]>

To: "ViSolve DB Team" <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, February 09, 2007 6:54 AM
Subject: Re: revoke SELECT on a column [ MySQL 4.1 ] + column "Comment"



Hello,
thanks again to ViSolve DB Team.

so, it turns out that for MySQL4.1, il will have to built a sql file, 
built with script (shell or perl).
[ note that so far I use MySQL 4.1 on production server, and I only test 
features on MySQL 5 on an other machine linux Debian].



at last, my LAST QUESTION concerns column "Comment"

In MySQL 5, I can do  :
mysql> select column_name,COLUMN_COMMENT from information_schema.columns
   where table_schema="a_base" and table_name='a_tab';


in MySQL 4.1 , the "equivalent" would be :
mysql> select distinct Column_name from columns_priv
   where Db='a_base' and Table_name='a_tab';

AND THERE IS NO COMMENT.

but, from the page :
http://dev.mysql.com/doc/refman/4.1/en/charset-show.html
it seems that one could use "Comment"

mysql> SHOW FULL COLUMNS FROM a_tab;
displays :
Field | Type | Collation | Null | Key | Default | Extra | Privileges | 
Comment |



I cannot find how to set these "Comment" ?

An idea ?

thanks.

-Gilles-


On Thu, 8 Feb 2007, ViSolve DB Team wrote:


Hi,

The thing is,
 we cannot dynamically pass columnnames to GRANT or REVOKE statements
 through procedures from mysql.






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: revoke SELECT on a column [ MySQL 4.1 ] + column "Comment"

2007-02-08 Thread Gilles MISSONNIER

Hello,
thanks again to ViSolve DB Team.

so, it turns out that for MySQL4.1, il will have to built a sql file, 
built with script (shell or perl).
[ note that so far I use MySQL 4.1 on production 
server, and I only test features on MySQL 5 on an other machine linux 
Debian].



at last, my LAST QUESTION concerns column "Comment"

In MySQL 5, I can do  :
mysql> select column_name,COLUMN_COMMENT from information_schema.columns
   where table_schema="a_base" and table_name='a_tab';


in MySQL 4.1 , the "equivalent" would be :
mysql> select distinct Column_name from columns_priv
   where Db='a_base' and Table_name='a_tab';

AND THERE IS NO COMMENT.

but, from the page :
http://dev.mysql.com/doc/refman/4.1/en/charset-show.html
it seems that one could use "Comment"

mysql> SHOW FULL COLUMNS FROM a_tab;
displays :
Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |


I cannot find how to set these "Comment" ?

An idea ?

thanks.

-Gilles-


On Thu, 8 Feb 2007, ViSolve DB Team wrote:


Hi,

The thing is,
 we cannot dynamically pass columnnames to GRANT or REVOKE statements
 through procedures from mysql.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]