mysql怎么查看字段的属性值
时间:2020-10-23 09:37
mysql查看字段属性值的方法:1、查询数据库中某个库所有字段的属性【table_schema= '数据库库名'】;2、查询数据库中指定库指定表所有字段的属性【table_schema= '数据库库名' and table_name= 】。 mysql查看字段属性值的方法: 1、查询数据库中某个库所有字段的属性(指定数据库库名),若想查询所有去掉where条件即可 2、查询数据库中指定库指定表所有字段的属性(指定数据库库名和表名) 3、查询数据库中特定列条件为某个字段名的属性 4、查询数据库中特定列(如:字段名、字段类型,长度大小、字段注释等) table_schema:数据库库名 table_name:表名 column_name:字段名 column_type:字段属性(包含字段类型和长度) column_comment :字段注释(字段说明) data_type:字段类型 column_key:字段的主键(PRI为主键) is_nullable:字段是否为空 更多相关免费学习推荐:mysql教程(视频) 以上就是mysql怎么查看字段的属性值的详细内容,更多请关注gxlsystem.com其它相关文章!select * from information_schema.columns
where table_schema= '数据库库名'
select * from information_schema.columns
where table_schema= '数据库库名' and table_name = '表名'
select table_schema,table_name,column_name,column_type,column_comment
from information_schema.columns
where TABLE_SCHEMA='数据库名' and column_name = '字段名';
select table_schema,table_name,column_name,column_type,column_comment from information_schema.columns
where table_schema= '数据库库名'