(1)获取数据库表格列设置的长度,SQL
SELECT CHARACTER_MAXIMUM_LENGTH FROM `information_schema`.`COLUMNS` WHERE `TABLE_NAME`='表名' AND `TABLE_SCHEMA`='数据库名' AND `COLUMN_NAME`='字段名'
(1)查出数据库表格所有的属性
SELECT * FROM `information_schema`.`COLUMNS` WHERE `TABLE_NAME`='表名' AND `TABLE_SCHEMA`='数据库名' AND `COLUMN_NAME`='字段名'