fetch multiple rows with few columns from one table and put it in other table

by Amit Upadhyay   Last Updated October 17, 2018 11:06 AM

I have a newly created table table_new, I want to populate this table with multiple rows from another table table_old.

Eg: table_old:

     A         | B         | C
 "sfds"        |         1 |    -1
 "sfdss"       |         2 |    -2


     A         | D         | C

I want to fill up column A and C in the table_new with around 10k rows from table_old for the same column A and C in table_old.

I referred few places like this etc.., but couldn't found the solution. The table table_new is already created, I need to populate a few columns of that.

Tags : postgresql

Related Questions

Postgres gist slow index f_unaccent

Updated April 09, 2018 20:06 PM