Click here to Skip to main content
15,177,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900