move table from one schema to another schema ?

后端 未结 3 807
北海茫月
北海茫月 2020-12-25 09:42

I want to move table from one schema to another schema in mysql , can anybody tell me how can I do this .

3条回答
  •  粉色の甜心
    2020-12-25 10:14

    Moving fooTable from old_db_schema to new_db_schema will be a 2 step process:

    Step 1:

    CREATE SCHEMA new_db_schema --Assuming you do not have new schema
    GO
    

    Step 2:

    ALTER SCHEMA new_db_schema
    TRANSFER old_db_schema.fooTable 
    GO
    

提交回复
热议问题