Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

insert data from one database table to another database table in postgresql using pgadmin

truncate table tableA;

insert into tableA
select *
from dblink('hostaddr=xxx.xxx.xxx.xxx dbname=mydb user=postgres',
            'select a,b from tableA')
       as t1(a text,b text);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #insert #data #database #table #database #table #postgresql #pgadmin
ADD COMMENT
Topic
Name
3+6 =