Skip to content

Instantly share code, notes, and snippets.

@simonthompson99
Last active January 15, 2021 12:42
Show Gist options
  • Save simonthompson99/dc3f12319b0398945ba707a207f1e3e0 to your computer and use it in GitHub Desktop.
Save simonthompson99/dc3f12319b0398945ba707a207f1e3e0 to your computer and use it in GitHub Desktop.
[Copy table from one schema to another] Copy table from one schema to another #sql #database
create table schema2.the_table (like schema1.the_table including all);
alter table schema2.the_table owner to dw_user;
insert into schema2.the_table
select *
from schema1.the_table;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment