15 lines
324 B
MySQL
15 lines
324 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`clean`()
|
||
|
BEGIN
|
||
|
DECLARE vLastDated DATE DEFAULT TIMESTAMPADD(WEEK,-2,util.VN_CURDATE());
|
||
|
|
||
|
DELETE FROM srt.lastRFID
|
||
|
WHERE created < vLastDated;
|
||
|
|
||
|
DELETE FROM srt.expedition
|
||
|
WHERE created < vLastDated;
|
||
|
|
||
|
DELETE FROM srt.moving;
|
||
|
END$$
|
||
|
DELIMITER ;
|