获取系统日期前7天的数据

如题,我想搜寻数据库资料,要求是当前系统日期的前七天
2025-12-13 00:55:09
推荐回答(3个)
回答1:

select * from tabel where data1 between GETDATE() and GETDATE() -7

回答2:

where 日期字段>=getdate()-7

回答3:

取getdate()做判断不行吗?