select * from A whereinsdate between convert(varchar(10),getdate()-30,120) and convert(varchar(10),getdate(),120)
可以这样写 select * from A where insdate?=trunc(sysdate)-30
SELECT * FROM 表名 WHERE ABS(DATEDIFF(DAY,GETDATE(),日期字段))<30