Skip site navigation (1) Skip section navigation (2)

Copying data from one table of one database to other table f other database

From: "Preetam Palwe" <preetamp(at)aftek(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Copying data from one table of one database to other table f other database
Date: 2009-04-27 10:30:29
Message-ID: D2885A8132EB554B854E9E017ED9FEAC144133@exbm.aftekpune.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hello all

                I want to copy the data from one table to other table.
These tables reside in two different databases.

I am thinking of using following query 

 

insert into table2 (select * from table1)

 

but the problem is how can I specify the database name?

 

thanks for the help

 

~PP

Responses

pgsql-novice by date

Next:From: Sean DavisDate: 2009-04-27 10:47:19
Subject: Re: Copying data from one table of one database to other table f other database
Previous:From: Adam RuthDate: 2009-04-23 22:51:46
Subject:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group