sql - How to get a list column names and datatypes of a table in PostgreSQL? - Stack Overflow

PHOTO EMBED

Mon Feb 20 2023 23:34:09 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira

SELECT
    column_name,
    data_type
FROM
    information_schema.columns
WHERE
    table_name = 'table_name';
content_copyCOPY

https://stackoverflow.com/questions/20194806/how-to-get-a-list-column-names-and-datatypes-of-a-table-in-postgresql