728x90

SELECT c.`TABLE_NAME`, t.`TABLE_COMMENT`, c.`COLUMN_NAME`, c.`COLUMN_COMMENT`, c.`DATA_TYPE`, c.`COLUMN_KEY`, c.`IS_NULLABLE` FROM INFORMATION_SCHEMA.COLUMNS AS c LEFT JOIN information_schema.`TABLES` AS t ON c.`TABLE_NAME` = t.`TABLE_NAME` WHERE c.`TABLE_SCHEMA` NOT IN('information_schema', 'performance_schema', 'mysql') ORDER BY c.`TABLE_SCHEMA`, c.`TABLE_NAME`, c.`ORDINAL_POSITION`

 

테이블명, 테이블 설명, 칼럼명, 칼럼 설명, 테이터 타입, pk, null 허용

이렇게 나옵니다.

반응형

댓글 0