Re: Archive Data
How about:
LOCK TABLE `live`.`table` WRITE;
INSERT INTO `archive`.`table` SELECT * FROM `live`.`table` WHERE `date_column` > DATE_SUB(now(), INTERVAL 6 MONTH);
DELETE FROM `live`.`table` WHERE `date_column` > DATE_SUB(now(), INTERVAL 6 MONTH);
UNLOCK TABLE `live`.`table`;
Subject
Written By
Posted
Re: Archive Data
September 12, 2016 03:22PM
September 14, 2016 07:43PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.