-- É¾³ý6¸öÔÂÖ®Ç°µÄPCSÏµÍ³ÈÕÖ¾Êý¾Ý
DECLARE @MonthsAgo INT = 6;
DECLARE @CurrentDate DATE = GETDATE();
DECLARE @CutOffDate DATE = DATEADD(MONTH, -@MonthsAgo, @CurrentDate);
 
-- É¾³ý²Ù×÷
DELETE FROM dt_log_pcs
WHERE [createtime ] < @CutOffDate;