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;

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.