[ MYSQL ] 데이터 명세서 작성용 스키마체크
SELECT COLUMN_NAME AS 'field_name', COLUMN_COMMENT AS 'comment', COLUMN_TYPE AS 'type', COLUMN_KEY AS 'KEY', IS_NULLABLE AS 'NULL', EXTRA AS 'auto', COLUMN_DEFAULT 'default' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '테이블명' AND TABLE_SCHEMA = '스키마명' AND COLUMN_NAME != 'created_at' AND COLUMN_NAME != 'updated_at' AND COLUMN_NAME != 'is_deleted' ORDER BY TABLE_NAME, ORDINAL_POSITION;