2

Given an existing database in PostgreSQL, I want to get the required SQL code to generate an identical database with no records.

Is there any easy way to do so?

1 Answer 1

2

You can use pg_dump command to do that. The option -s dumps only the schema and no data from the database.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.