mysql 查询表字段清单

select t.table_name,t.COLUMN_NAME,t.COLUMN_TYPE,t.CHARACTER_MAXIMUM_LENGTH
     ,t.COLUMN_DEFAULT ,t.COLUMN_COMMENT,t.TABLE_SCHEMA
from information_schema.columns t
where table_schema ='schema_namexxx'
order by t.table_name,t.COLUMN_NAME
end