Last active
January 15, 2021 12:42
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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