posgres insert as select code example Example: postgre insert select insert into TABLENAMEA (A,B,C,D) select A,B,C,D from TABLENAMEB