a job to delete rows older than 3 months in mysql database

后端 未结 4 1764
走了就别回头了
走了就别回头了 2021-02-01 06:44

We use mysql server as a centralized logging system and I want to have a job to delete\\clean the table entries that are more than 3 months old regularly. What is the best way t

4条回答
  •  南方客
    南方客 (楼主)
    2021-02-01 07:37

    Paraphrasing your question, "I have code that doesn't depend on the client, which I want to run on the database multiple times, and I don't need to see output", then the answer is "write a stored proc, and call it from whatever client on a regular basis".

提交回复
热议问题