SELECT TABLE_NAME as '表名称', COLUMN_NAME as '字段名', DATA_TYPE as '字段类型', CHARACTER_MAXIMUM_LENGTH as '字段长度', IS_NULLABLE as '是否可为空', COLUMN_COMMENT as '备注'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'schema_name'
ORDER BY TABLE_NAME, ORDINAL_POSITION;
导出关系型数据库中表及表字段详情
最新推荐文章于 2024-08-30 19:56:58 发布