Restore single table

Started by Sonam Sharmaover 6 years ago2 messagesgeneral
Jump to latest
#1Sonam Sharma
sonams1209@gmail.com

Can someone please help me with the command to restore a single table using
psql.

Took the backup using below command :
pg_dump -t (tablename) dbname > tablename.sql

#2Ritesh Jha
kumarritesh309@gmail.com
In reply to: Sonam Sharma (#1)
Re: Restore single table

psql -d databaseName -f tablename.sql

On Wed, Oct 30, 2019, 5:51 PM Sonam Sharma <sonams1209@gmail.com> wrote:

Show quoted text

Can someone please help me with the command to restore a single table
using psql.

Took the backup using below command :
pg_dump -t (tablename) dbname > tablename.sql