显示最近30天的记录vs显示这个月的记录(pl\sql)
//显示系统最近30天的记录
where "SB_DATE" BETWEEN TO_DATE (
TO_CHAR (
SYSDATE - 30,
'mm-dd-yyyy'
)
|| '00:00:01',
'mm-dd-yyyy hh24:mi:ss'
)
AND TO_DATE (
TO_CHAR (
SYSDATE - 1,
'mm-dd-yyyy'
)
|| '23:59:59',
'mm-dd-yyyy hh24:mi:ss'
)
//显示这个月的记录
where to_char("SENT_BOUNCE_BACK_OVDWELCOME"."SB_DATE", 'mm')=to_char(sysdate,'mm')