티스토리 뷰
create view if not exists view_table_info as
select `information_schema`.`COLUMNS`.`TABLE_NAME` as `table_name`,
`information_schema`.`COLUMNS`.`COLUMN_NAME` as `field`,
`information_schema`.`COLUMNS`.`COLUMN_COMMENT` as `comment`,
`information_schema`.`COLUMNS`.`COLUMN_TYPE` as `type`,
`information_schema`.`COLUMNS`.`IS_NULLABLE` as `nullable`,
`information_schema`.`COLUMNS`.`COLUMN_KEY` as `key_type`,
`information_schema`.`COLUMNS`.`COLUMN_DEFAULT` as `default_value`,
`information_schema`.`COLUMNS`.`EXTRA` as `extra`
from `INFORMATION_SCHEMA`.`COLUMNS`
where `information_schema`.`COLUMNS`.`TABLE_SCHEMA` = 'csq';
테이블정보를 확인하는 View 를 생성해두면.. 편리한 부분이 있어요 ^^
'dev' 카테고리의 다른 글
PHP 프로젝트에서 유용한 Composer 패키지 추천 (0) | 2024.12.07 |
---|---|
Perplexity API: 사용 가능한 모델과 가격 정보 (1) | 2024.11.28 |
truncate table (0) | 2024.11.23 |
Ubuntu 22.04에서 Apache를 사용하여 RoundCube 웹메일 설치하기 (0) | 2024.11.23 |
Ubuntu 서버에서 Git SSH 키 등록 방법 (0) | 2024.11.23 |