Differences
This shows you the differences between two versions of the page.
copy_table_to_another_schema [2013/10/02 09:12] |
copy_table_to_another_schema [2021/04/05 11:23] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Copy Table to another Schema ====== | ||
+ | ===== The SQL Way ===== | ||
+ | |||
+ | CREATE TABLE new_schema.my_table | ||
+ | | ||
+ | < | ||
+ | |||
+ | To copy the contents just use an INSERT statement like this: | ||
+ | |||
+ | INSERT INTO new_schema.my_table SELECT * FROM other_schema.my_table; | ||
+ | |||
+ | {{tag> |