Click here to Skip to main content
14,392,000 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all

I have 2 database in my system PostgreSQL ver 9.1
1)EssaePOS
2)TouchPOS

I want to copy all the data from EssaePOS one table to TouchPOS another table.
the table name and number of column is same for both the database.

I searched google.got something called pg_dump but not getting how to use that.

Can anyone tell how to copy table data from one table to other.
Posted
Updated 8-Feb-15 18:24pm
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

try
SELECT * INTO TouchPOS FROM EssaePOS

ref.
http://www.postgresql.org/docs/9.1/static/sql-selectinto.html[^]

if you want to copy a specific column set then into in not applicable.<br />
see this.

http://stackoverflow.com/questions/17333994/how-to-copy-one-column-of-a-table-into-another-tables-column-in-postgresql-comp[^]
   
v2
Comments
Black_Rose 5-Feb-15 2:21am
   
I want to copy one table data..not all..
/\jmot 5-Feb-15 2:36am
   
updated.
Black_Rose 8-Feb-15 23:29pm
   
Not working..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100