728x90
SELECT
t1.table_name, t1.table_comment, column_name, data_type, column_type, column_key, is_nullable, column_default, extra, column_comment
FROM
(SELECT
table_name, table_comment
FROM
information_schema.TABLES WHERE table_schema='DB명') t1,
(SELECT
table_name, column_name, data_type, column_type, column_key, is_nullable, column_default, extra, column_comment, ordinal_position
FROM
information_schema.COLUMNS WHERE table_schema='DB명') t2
WHERE
t1.table_name = t2.table_name
ORDER BY
t1.table_name, ordinal_position;
table comment 및 column comment를 데이터베이스에서 관리한다면,
output 결과를 csv, xlsx로 Export 하여 손쉽게 명세서를 관리할 수 있다.
728x90
반응형
'Cowork' 카테고리의 다른 글
[R&R] RACI Chart, 프로젝트 책임 관리 도구 (0) | 2024.05.25 |
---|---|
[IT 직무] R&R과 현재 수행 직무 정리 (0) | 2024.05.24 |
[CTO/CIO] C-Level이 알아야 할 것들... (0) | 2024.04.26 |
[Slack-Github] 깃허브 알림 연동 (0) | 2023.02.09 |
WBS로 프로젝트 관리하기 (0) | 2022.05.11 |