如果要在sql那里删除,需要做计划,写sql语句,如
Delete from 某表 where DateDiff(d, 时间, GetDate()) > 20
https://jingyan.baidu.com/article/b907e62790e89846e7891cc4.html