从今天开始最近7天(1周)内如何从DB2中获取记录

时间:2019-01-08 23:45:35

标签: sql database db2 where-clause

我正在使用DB2。我想从一列中获取本周的记录。我想使用类似于以下内容(这是针对SQL 2005)

Select count(*) from Applications WHERE ReceivedDate is this week. (Last 7 days including today)

1 个答案:

答案 0 :(得分:1)

尝试这样的WHERE子句:

WHERE ReceivedDate > current date - 7 days