在一张表中如何删除与当前时间相差5分钟以上的记录,求sql语句
------解决方案--------------------
delete 表 where datediff(mm,时间字段,getdate())> 5
------解决方案--------------------
delete from tbl where dateidff(second,addtime,getDate())> =5
------解决方案--------------------
delete * from tb where abs(datediff(minute,getdate(),时间字段)) > 5
------解决方案--------------------
delete 表 where datediff(ss,时间字段,getdate())> 300
------解决方案--------------------
delete from tb where abs(datediff(minute,getdate(),时间字段)) > 5
------解决方案--------------------
看错了,如果是5分钟,把second改成minute