MySQL efficiently copy all records from one table to another

前端 未结 4 1447
栀梦
栀梦 2021-01-01 15:47

Is there a more-efficent, less laborious way of copying all records from one table to another that doing this:

INSERT INTO product_backup SELECT * FROM produ         


        
4条回答
  •  别那么骄傲
    2021-01-01 16:05

    DROP the destination table:

    DROP TABLE DESTINATION_TABLE;
    CREATE TABLE DESTINATION_TABLE AS (SELECT * FROM SOURCE_TABLE);
    

提交回复
热议问题