How to generate the “create table” sql statement for an existing table in postgreSQL

后端 未结 19 2017
花落未央
花落未央 2020-11-28 17:49

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

19条回答
  •  迷失自我
    2020-11-28 18:05

    pg_dump -t 'schema-name.table-name' --schema-only database-name
    

    More info - in the manual.

提交回复
热议问题