I have created a table in postgreSQL. I want to look at the SQL statement used to create the table but cannot figure it out.
How do I get the create table SQL statement for an existing table in Postgres via commandline or SQL statement?
create table
pg_dump -t 'schema-name.table-name' --schema-only database-name
More info - in the manual.
2.1m questions
2.1m answers
60 comments
57.0k users