I want to copy table contained from one database and insert onto another database table

前端 未结 7 1836
你的背包
你的背包 2020-12-07 08:38

I want to copy a table\'s schema as well as the data within that table to another database table in another database on a live server. How could I do this?

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 08:53

    simply use -

    CREATE TABLE DB2.newtablename SELECT * FROM DB1.existingtablename;

提交回复
热议问题