Postgresql 컬럼 조회

2025. 3. 14. 18:06Database/PostgreSQL

select
    table_name,
    column_name,
    udt_name as "type",
    character_maximum_length as length
    ,
    (case
        when is_nullable = 'NO' then 'N'
        else ''
    end) as "nullable"
from
    INFORMATION_SCHEMA.COLUMNS
where
    table_name = 'cddem_parsinghistory'
order by ordinal_position;

'Database > PostgreSQL' 카테고리의 다른 글

[postgresql] AUTO INCREMENT 사용하기  (0) 2025.04.29
[PostgreSQL] 암복호화  (0) 2023.06.27
[PostgreSQL] 테이블/컬럼 정보 조회 SQL  (0) 2023.06.20
[PostgreSQL] UPSERT 적용  (1) 2020.05.19