1. 程式人生 > >MYSQL中SQL語句查詢表字段名、註釋、欄位型別

MYSQL中SQL語句查詢表字段名、註釋、欄位型別

select column_name,column_comment,data_type from information_schema.columns where table_name='你的表名'

PLUS:

查詢dababase下所有表名及表註釋

SELECT TABLE_NAME,TABLE_COMMENT FROM information_schema.TABLES WHERE table_schema='database名';