Programming/SQL
테이블 구조(MySQL) 쿼리로 갖고 오기
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` 테이블명, 테이블 ..
2022. 2. 4. 10:44