查询mysql表的字段详情
select column_name as 字段类型,
column_type as 数据类型,
data_type as 字段类型,
character_maximum_length as 长度,
is_nullable as 是否为空,
column_default as 默认值,
column_comment as 备注
from
information_schema.columns
where
table_schema = '数据库名' and table_name = '表名';
本文来自博客园,作者:iaxusyy,转载请注明原文链接:https://www.cnblogs.com/ww-NoBugs/p/15875143.html