MySQL 的Comment命令行下面在哪里看?我用MySql Administrator看是乱码
解决方案 »
- 关于LINUX MYSQL的入门级问题
- 小弟求救,级联删除不起作用????
- WHERE后面可容多少个OR
- C++和MYSQL的多SQL语句问题
- mysql数据库损坏了,建表时只有.frm文件能否恢复数据库。
- 请问怎么把windows 中的mysql数据库转移到linux-mysql??? 这数据库的表名及数据都是中文的!
- mysql不能建立数据库
- JDBC CONNECTION???????????????????????????????????????????///
- 改用哪种索引
- net start mysql发生系统错误2 ,找不到指定文件?求各位的大神指导
- mysql 有没有类似于oracle的comment on之类的语法?
- mysql的log
select table_comment from information_schema.tables;查字段的: select column_comment from information_schema.columns;
检查一下字符集设置
show variables like 'char%';
+---------------+---------------------------------------------------------------
| Table | Create Table
+---------------+---------------------------------------------------------------
| t_iorikingdom | CREATE TABLE `t_iorikingdom` (
`id` int(11) DEFAULT NULL COMMENT 'comment for id',
`f1` char(1) DEFAULT NULL COMMENT 'comment for f1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='comment for table' |
+---------------+---------------------------------------------------------------
1 row in set (0.00 sec)mysql>
mysql> show full columns from t_iorikingdom;
+-------+---------+-------------------+------+-----+----....-----+----------------+
| Field | Type | Collation | Null | Key | Def.... | Comment |
+-------+---------+-------------------+------+-----+----....-----+----------------+
| id | int(11) | NULL | YES | | NUL....nces | comment for id |
| f1 | char(1) | latin1_swedish_ci | YES | | NUL....nces | comment for f1 |
+-------+---------+-------------------+------+-----+----....-----+----------------+
2 rows in set (0.00 sec)mysql>
mysql> show table status like 't_iorikingdom';
+---------------+--------+---------+------....----------------+-------------------+
| Name | Engine | Version | Row_f.... Create_options | Comment |
+---------------+--------+---------+------....----------------+-------------------+
| t_iorikingdom | InnoDB | 10 | Compa.... | comment for table |
+---------------+--------+---------+------....----------------+-------------------+
1 row in set (0.00 sec)mysql>
+---------------+---------------------------------------------------------------
| Table | Create Table
+---------------+---------------------------------------------------------------
| t_iorikingdom | CREATE TABLE `t_iorikingdom` (
`id` int(11) DEFAULT NULL COMMENT 'comment for id汉字',
`f1` char(1) DEFAULT NULL COMMENT 'comment for f1汉字'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='comment for table汉字' |
+---------------+---------------------------------------------------------------
1 row in set (0.06 sec)mysql> show full columns from t_iorikingdom;
+-------+---------+-------------------+------+-----+-------....----+--------------------+
| Field | Type | Collation | Null | Key | Defaul.... | Comment |
+-------+---------+-------------------+------+-----+-------....----+--------------------+
| id | int(11) | NULL | YES | | NULL ....ces | comment for id汉字 |
| f1 | char(1) | latin1_swedish_ci | YES | | NULL ....ces | comment for f1汉字 |
+-------+---------+-------------------+------+-----+-------....----+--------------------+
2 rows in set (0.00 sec)mysql> show table status like 't_iorikingdom';
+---------------+--------+---------+----------.....----+-----------------------+
| Name | Engine | Version | Row_forma.....ons | Comment |
+---------------+--------+---------+----------.....----+-----------------------+
| t_iorikingdom | InnoDB | 10 | Compact ..... | comment for table汉字 |
+---------------+--------+---------+----------.....----+-----------------------+
1 row in set (0.00 sec)mysql>