举个例子:comment on column STD.gen is
'性别
男:0
女:1
'
/mysql有类似的语法么???

解决方案 »

  1.   

    有的,示例:mysql> create table tb_aaa(id int,
        -> type varchar(5) comment 'field is type:"y" or "n"',
        -> total_count int);
    Query OK, 0 rows affected (0.06 sec)mysql> show create table tb_aaa\G
    *************************** 1. row ***************************
           Table: tb_aaa
    Create Table: CREATE TABLE `tb_aaa` (
      `id` int(11) DEFAULT NULL,
      `type` varchar(5) DEFAULT NULL COMMENT 'field is type:"y" or "n"',
      `total_count` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8
    1 row in set (0.01 sec)mysql>
      

  2.   

    mysql> alter table tb_aaa modify id int comment 'the column is auto_increment';
    Query OK, 0 rows affected (0.03 sec)
    Records: 0  Duplicates: 0  Warnings: 0
      

  3.   

    没有直接的象ORACLE的 comment on Schema Objects  的语句。只能象楼上所列出的方法进行 alter table / alter view / alter ... 中添加。具体的语法你可以参考一下MYSQL官方文档。MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
      

  4.   

    mysql中没有 直接的语句 不过可以间接实现