首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从mysql客户端查看字段注释?

问如何从mysql客户端查看字段注释?
EN

Stack Overflow用户
提问于 2011-10-20 19:14:23
回答 3查看 12.4K关注 0票数 26

我希望看到个别领域的评论。通常情况下,我希望从"describe“参数中获得一些东西。

代码语言:javascript
复制
mysql> describe metrics;
+-------+---------------------+------+-----+---------+----------------+
| Field | Type                | Null | Key | Default | Extra          |
+-------+---------------------+------+-----+---------+----------------+
| id    | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| ty    | int(10) unsigned    | NO   |     | NULL    |                |
| t     | bigint(20) unsigned | NO   |     | NULL    |                |
| s     | int(10) unsigned    | NO   |     | 60000   |                |
| e     | int(10) unsigned    | NO   |     | NULL    |                |
| c     | int(10) unsigned    | NO   |     | NULL    |                |
+-------+---------------------+------+-----+---------+----------------+
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-10-02 17:04:46

代码语言:javascript
复制
show full columns from <table_name>

这是输出:

代码语言:javascript
复制
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment

我希望这对你有用

票数 86
EN

Stack Overflow用户

发布于 2011-10-20 19:16:53

此查询将提供比describe语句多得多的信息:

代码语言:javascript
复制
SELECT * 
FROM information_schema.columns 
WHERE table_name = 'metrics'
AND table_schema = '...' -- Optionally, filter the schema as well, to avoid conflicts
票数 12
EN

Stack Overflow用户

发布于 2017-03-03 12:01:07

你总是可以使用:

代码语言:javascript
复制
show create table <tablename>
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7835092

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档