orcale in the last 30 days of data acquisition

select 

from

table_name 

where 

to_char(时间字段'YYYY-MM-dd') between to_char(sysdate,'YYYY-MM')||'-01' and to_char(last_day(SYSDATE),'YYYY-MM-dd');

Guess you like

Origin www.cnblogs.com/ww5566/p/11114246.html