mysql獲取表屬性值的方法
1.查詢數據表中所有字段的屬性
select * from information_schema.columns
where table_schema= '數據庫庫名' and table_name = '表名'
2.查詢數據庫中所有字段的屬性
select * from information_schema.columns
where table_schema= '數據庫庫名'
3.查詢數據庫中特定列條件字段的屬性
select table_schema,table_name,column_name,column_type,column_comment
from information_schema.columns
where TABLE_SCHEMA='數據庫名' and column_name = '字段名';