Using MySQL 5.0.18
mysql> use test1;
Database changed
mysql> show tables;
+-----------------+
| Tables_in_test1 |
+-----------------+
| t1 |
+-----------------+
1 row in set (0.00 sec)
mysql> show create table t1 \G
***************** 1. row *****************
Table: t1
Create Table: CREATE TABLE `t1` (
`ID` int(11) NOT NULL auto_increment,
`set1` varchar(30) default NULL,
`col2` char(20) default NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='test1.t1 test table'
1 row in set (0.00 sec)
mysql> show full columns from t1 \G
***************** 1. row *****************
Field: ID
Type: int(11)
Collation: NULL
Null: NO
Key: PRI
Default: NULL
Extra: auto_increment
Privileges: select,insert,update,references
Comment:
***************** 2. row *****************
Field: set1
Type: varchar(30)
Collation: latin1_swedish_ci
Null: YES
Key:
Default: NULL
Extra:
Privileges: select,insert,update,references
Comment:
***************** 3. row *****************
Field: col2
Type: char(20)
Collation: latin1_swedish_ci
Null: YES
Key:
Default: NULL
Extra:
Privileges: select,insert,update,references
Comment:
3 rows in set (0.00 sec)
For some reason the
mysql> show full columns from t1 \G
command is not returning the Comment field for me. Is there
a variable that needs setting to enable this?
Regards
Keith
In theory, theory and practice are the same;
in practice they are not.
On Thu, 20 Apr 2006, Gilles MISSONNIER wrote:
> To: Gabriel PREDA <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> From: Gilles MISSONNIER <[EMAIL PROTECTED]>
> Subject: Re: describe table : improvement
>
> hello,
> thank you for your answer, but
>
> this DO NOT work for me. I use MySQL 4.0.24 [ Linux Debian sarge stable ].
>
> the "FULL" argument displays ONLY the Privileges, NOT the Comment, neither
> Collation.
>
>
> mysql> CREATE TABLE a_table (a_column CHAR(30) COMMENT
> mysql> 'commentaire');
> Query OK, 0 rows affected (0.03 sec)
>
> mysql> SHOW FULL COLUMNS FROM a_table;
> +----------+----------+------+-----+---------+-------+---------------------------------+
> | Field | Type | Null | Key | Default | Extra | Privileges
> | |
> +----------+----------+------+-----+---------+-------+---------------------------------+
> | a_column | char(30) | YES | | NULL | |
> | select,insert,update,references |
> +----------+----------+------+-----+---------+-------+---------------------------------+
> 1 row in set (0.03 sec)
>
>
> It seems this is a feature available for a more recent release.
>
> Is this right ?
>
>
>
>
> On Wed, 19 Apr 2006, Gabriel PREDA wrote:
>
> > It is:
> >
> > SHOW FULL COLUMNS FROM a_table
> >
> > You will get 2 extra columns:
> >
> > - Privileges (showing the privileges of the user for that column)
> > - Comment (showing a per column comment)
> >
> > When creating a table you can add a comment using COMMENT keyword:
> >
> > CREATE TABLE a_table
> > (
> > a_column CHAR(30) CHARSET utf8 COMMENT 'Some comment'
> > ) ;
> >
> > Is this... what you needed ?
> >
> > --
> > Gabriel PREDA
> > Senior Web Developer
> >
>
> =_==_==_==_==_==_=
> =¯==¯==¯==¯==¯==¯=
> Gilles Missonnier
> IAP - [EMAIL PROTECTED]
> 01 44 32 81 36
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]