473,394 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Copying tables between databases

Hello all !
I'm a PostgreSQL newbie.
I'd like to know how to copy a table called TABLE1 and located in DATABASE1
as a TABLE2 which will be located in DATABASE2.
I have'nt found anything concerning table copies between databases with SQL.
Thanx for your help.
Jérôme
Nov 22 '05 #1
1 2002
A long time ago, in a galaxy far, far away, "azaz" <oi*******@azijza.com> wrote:
Hello all !
I'm a PostgreSQL newbie.
I'd like to know how to copy a table called TABLE1 and located in DATABASE1
as a TABLE2 which will be located in DATABASE2.
I have'nt found anything concerning table copies between databases with SQL.
Thanx for your help.
Jérôme


There is a "db_link" system that can do some crosslinks between
databases, but this isn't something you can accomplish directly in SQL...

Perhaps you might try:

% pg_dump -c -t TABLE1 DATABASE1 | psql DATABASE2

--
(format nil "~S@~S" "cbbrowne" "ntlug.org")
http://www.ntlug.org/~cbbrowne/rdbms.html
"I've run DOOM more in the last few days than I have the last few
months. I just love debugging ;-)" -- Linus Torvalds
Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: 21novembre | last post by:
Hi all, I made a question several days before to describe my strange trouble of mysqldump. But I still can't figour it out. Well, I just want to ask another question whether I could just backup...
1
by: Jani Tamminen | last post by:
I want to copy data from our production database to the development database. I want to move only the data. I do not need the table structure, constrains or anything else. I think I can use the...
2
by: Stefan Schneider | last post by:
Hi, I have to copy an existing database from one Windows-Server to another one. The source database is a 8.1.0 database on a Windows 2000 Server, the destination database will be a newer 8.x...
4
by: nick_faye | last post by:
hi guys, hope somebody can assist me. i have two ms access database. i have to copy the entries in database1 to my database2. however, i have to copy entries from database1 that does not...
3
by: sparks | last post by:
I was copying fields from one table to another. IF the var name starts with milk I change it to egg and create it in the destination table. It works fine but I want to copy the description as...
1
by: Peschello | last post by:
I am attempting to copy table data from our live production database to our development database. To do this, I need to specify the name of the database in addition to the table name. I'm running...
6
by: Ryan | last post by:
I have 2 Access '97 databases. I am trying to migrate all the data from one to the other (append to existing records). I do not have Access '97 and opening with Access XP or later causes...
0
by: Icemokka | last post by:
Hi all, We have 2 databases that are not connected to each other directly. Changes to either databases can only be done on one side. Those 2 databases are of the type MSAccess or MSSQL but with...
2
by: MarkFox | last post by:
Hi, I have two tables: 'Master' and 'Maximo'. I need to populate the sub-tables in 'Master' with the data from the equivalent sub-tables in 'Maximo'. I'm aware that I can do this for each...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.