码迷,mamicode.com
首页 > 数据库 > 详细

查看mysql表的备注等属性

时间:2016-02-18 11:41:03      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:

SELECT
COLUMN_NAME,
DATA_TYPE AS `数据类型`,
CHARACTER_MAXIMUM_LENGTH AS `字符长度`,
NUMERIC_PRECISION AS `数字长度`,
NUMERIC_SCALE AS `小数位数`,
IS_NULLABLE AS `是否允许非空`,
CASE WHEN EXTRA = ‘auto_increment‘ THEN 1 ELSE 0 END AS `是否自增`,
COLUMN_DEFAULT AS `默认值`,
COLUMN_COMMENT AS `备注`
FROM information_schema.COLUMNS WHERE TABLE_NAME=‘hxh_friends‘

查看mysql表的备注等属性

标签:

原文地址:http://www.cnblogs.com/mr-level/p/5197534.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!