Search code examples
sqlpostgresqlexternal-tables

how do we copy external tables from one schema to another schema in same postgresql database


I have two schema's in one database

1) public
2) test

In public i have list of external tables like

ext_table1,ext_table_2,ext_table_3

How do i copy those tables to test schema from public in the same database?


Solution

  • If you want to move them, then just do that:

    alter table ext_table1 set schema test;