Transfer data between databases with PostgreSQL

前端 未结 9 1512
我寻月下人不归
我寻月下人不归 2020-12-22 17:51

I need to transfer some data from another database. The old database is called paw1.moviesDB and the new database is paw1. The schema of each table are the following.

<
9条回答
  •  清酒与你
    2020-12-22 18:02

    Just like leonbloy suggested, using two schemas in a database is the way to go. Suppose a source schema (old DB) and a target schema (new DB), you can try something like this (you should consider column names, types, etc.):

    INSERT INTO target.Awards SELECT * FROM source.Nominations;
    

提交回复
热议问题