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

H

How Can We Help?

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

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;

About the author

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.

About Author

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.

Follow Me