56,777
社区成员
发帖
与我相关
我的任务
分享
mysql> create table t (
-> id int primary key COMMENT 'Hello world!',
-> col varchar(10) COMMENT 'How are you'
-> )COMMENT 'this is table COMMENT ';
Query OK, 0 rows affected (0.16 sec)
mysql> desc t;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id | int(11) | NO | PRI | NULL | |
| col | varchar(10) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.09 sec)
mysql> show full columns from t;
+-------+-------------+-------------------+------+-----+---------+-------+---------------------------------+--------------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-------+-------------+-------------------+------+-----+---------+-------+---------------------------------+--------------+
| id | int(11) | NULL | NO | PRI | NULL | | select,insert,update,references | Hello world! |
| col | varchar(10) | latin1_swedish_ci | YES | | NULL | | select,insert,update,references | How are you |
+-------+-------------+-------------------+------+-----+---------+-------+---------------------------------+--------------+
2 rows in set (0.00 sec)
mysql>