How to copy a columns data from one table into a column in another table using PostGreSQL

Written by Ian Carnaghan · 15 sec read >

How to copy a columns data from one table into a column in another table using PostgreSQL? Eg. name columns data from the users table into namecolumn in the new_users table.

Execute the query below with different column names and table names and all the data for a specific column will be copied over to the selected column in another table.

INSERT INTO n_owners(owner_name) SELECT owner_name FROM owners;

Last Updated On April 07, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

Notify of