Using the PostgreSQL System Tables

From Jens' Hjørne
Revision as of 13:44, 24 May 2018 by Jens (talk | contribs) (Created page with "==Finding columns and their data types for a specific table== select c.table_name, c.column_name, c.data_type, character_maximum_length from information_schema.columns as c ...")
(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, character_maximum_length 
from information_schema.columns as c 
where c.table_name = 'TABLENAME';