Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 289 Bytes

move_table_from_one_database_to_another.md

File metadata and controls

7 lines (5 loc) · 289 Bytes

Move table from one database to another in the same cluster

"CREATE TABLE IF NOT EXISTS toDatabase.table LIKE fromDatabase.table"

"RENAME TABLE fromDatabase.table TO fromDatabase.table_new, toDatabase.table TO fromDatabase.table, fromDatabase.table_new TO toDatabase.table"