CodePudding user response:
Insert into t2Select
*
The from t2
Where the date=new
CodePudding user response:
Can try mysql own table synchronization mechanism, this is the first library building table script, the original table and backup table, in the different database, but shall be the same structure,The CREATE TABLE ` TABLE name ` (
` field... ,
PRIMARY KEY (` PRIMARY KEY field `)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 CONNECTION='mysql://backup database user name: password database backup @ backup database IP: port/backup database backup database name/backup database table name';
CodePudding user response:
Can use the database synchronization tool DBSync, support a variety of database, the synchronization between the Settings page, use the select statement limit participation in sync source range, rule out the old data, as shown in the figure below: