Move rows from TableA into Table-Archive

前端 未结 4 1069
夕颜
夕颜 2021-01-01 01:24

Is it possible to move rows that are 3 days old into an other table called \"Table_Archive\" automatically in mysql ones a week?

tableA ex:

ID | stri         


        
4条回答
  •  囚心锁ツ
    2021-01-01 02:04

    Adding to the best answer (imo) by Tom Mac regarding the event scheduler - be aware that when backing up the schema, you have to specify that you want the events backed up with it via the --events=TRUE flag.

    If you're exporting manually in the workbench, the latest version has a checkbox on the main 'Export To Disk' tab - older versions hide it away in the Advanced Export Options tab.

提交回复
热议问题