-- ´æ´¢¹ý³Ì
CREATE PROCEDURE DeleteOldRecords
    @MonthsAgo INT
AS
BEGIN
    DECLARE @CutOffDate DATE = DATEADD(MONTH, -@MonthsAgo, GETDATE());
 
    DELETE FROM dt_log_pcs
    WHERE [createtime ] < @CutOffDate;
END
GO