Thread: Need help in copying a table from one database to other

Need help in copying a table from one database to other

From
Rekha Ravi Pai
Date:
Hi,
I want to copy a table say employeedetails from employee
database to library database. Can you help me giving the
detailed steps to do this.
Thanks And Regards,
Rekha.

--
--------------------------------------------------------------------------------
Rekha Pai
Senior Software Consultant
SoftJin Technologies Pvt. Ltd.
#102, Mobius Tower, SJR I-Park, EPIP,
Whitefield, Bangalore 560066
Phone: +91-80-41779999
Fax: +91-80-41157070




Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for  the use  of the  individual or entity  to which they  are  addressed. It
may  contain confidential,  proprietary or legally  privileged  information.
If  you  are  not  the  intended recipient please be advised that you have
received  this  message in error and any use is strictly prohibited. Please
immediately  delete it  and all copies of it from your system, destroy any
hard  copies  of  it and  notify  the  sender  by return mail. You must not,
directly or indirectly, use,  disclose,  distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________


Re: Need help in copying a table from one database to other

From
"A. Kretschmer"
Date:
In response to Rekha Ravi Pai :
> Hi,
> I want to copy a table say employeedetails from employee
> database to library database. Can you help me giving the
> detailed steps to do this.

pg_dump -t <insert the table-name> <insert the source-db> | psql <insert destination db>

In you case:

pg_dump -t employeedetails employee | psql library

Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)