根据日期从表中删除 [英] Delete from a table based on date
本文介绍了根据日期从表中删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以帮我删除早于特定日期的数据的脚本.
Can anyone help me with the script which will delete the data older than the particular date.
谢谢
推荐答案
delete from YOUR_TABLE where your_date_column < '2009-01-01';
这将从 YOUR_TABLE
中删除 your_date_column
中的日期早于 2009 年 1 月 1 日的行.即2008-12-31
的日期代码> 将被删除.
This will delete rows from YOUR_TABLE
where the date in your_date_column
is older than January 1st, 2009. i.e. a date with 2008-12-31
would be deleted.
这篇关于根据日期从表中删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文