Created
December 2, 2011 14:51
select_table_and_columns_from_postgres.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
tables.table_name, | |
columns.column_name | |
from information_schema.tables | |
inner join information_schema.columns | |
on information_schema.columns.table_name = information_schema.tables.table_name | |
where tables.table_schema = 'public' | |
and tables.table_type = 'BASE TABLE' | |
order by tables.table_name, columns.column_name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment