select ORDINAL_POSITION as 序号, COLUMN_NAME as 列名,
COLUMN_TYPE as 数据类型, CHARACTER_MAXIMUM_LENGTH as 长度,
NUMERIC_SCALE as 小数位,'' as 标识,
case when column_key = '' then '' ELSE '主键' END as 主键,
'' as 外键,
case when IS_NULLABLE = 'NO' then '否' ELSE '是' END as 允许空,
COLUMN_DEFAULT as 默认值,
COLUMN_COMMENT as 说明
from information_schema.columns where TABLE_NAME= 'tb_qy_activity_comment' /*表名*/