Using the PostgreSQL System Tables

From Jens' Hjørne
Revision as of 13:45, 24 May 2018 by Jens (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Finding columns and their data types for a specific table

select c.table_name, c.column_name, c.data_type, c.character_maximum_length 
from information_schema.columns as c 
where c.table_name = 'TABLENAME';