MYSQL 获取表的列信息

SELECT COLUMN_NAME as '列名' ,DATA_TYPE as '字段类型' ,COLUMN_TYPE as '长度加类型' 
FROM information_schema.`COLUMNS` 
where 
TABLE_SCHEMA like '库名'
and
TABLE_NAME like '表名'

  

posted @ 2014-01-23 13:28  踏叶乘风  阅读(727)  评论(0编辑  收藏  举报