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.
1.4m articles
1.4m replys
5 comments
56.9k users