呵呵.
这些注释是不写到服务器的数据字典里的.
create table test1 (  id int auto_increment not null primary key , #this is id 
  topic char(50) not null default '',  # this is topic
  category char(50) not null default '',
  re char(250) not null default '',
  isvalid enum('Y','N') not null default 'Y',
  time datetime not null default '1900-01-01'
)
 COMMENT = "这里注释"

解决方案 »

  1.   

    哦,应该是这样的:create table test1 (  id int auto_increment not null primary key , add the COMMENT 'this is id' 
      topic char(50) not null default '',          add the COMMENT ' this is topic '
      category char(50) not null default '',
      re char(250) not null default '',
      isvalid enum('Y','N') not null default 'Y',
      time datetime not null default '1900-01-01'
    )我同事告诉我用mysqlshow -i -u root -pXXX dbName test1是可以取到的,但是我在程序中用不了mysqlshow啊~~~怎么办??帮帮我啊~~~
      

  2.   

    错了,应该是才对:create table test1 (  id int auto_increment not null primary key , COMMENT 'this is id' 
      topic char(50) not null default '',          COMMENT ' this is topic '
      category char(50) not null default '',
      re char(250) not null default '',
      isvalid enum('Y','N') not null default 'Y',
      time datetime not null default '1900-01-01'
    )
      

  3.   

    上边的语句不能执行阿 我的是mysql 4.0.16
      

  4.   

    不需要逗号的.
    create table test1 (
      id int auto_increment not null primary key  COMMENT 'this is id' 
    )这个语句只在 MySQL 4.1 以及更新的版本中能正确使用.要得到注释信息
    你可以在 程序里执行 SHOW CREATE TABLE `test1` 或者 SHOW FULL COLUMNS