在数据库里面的时间格式为【文本】,形式【20211211】,需要选择距离现在一个月以内的数据
select
*
from
table
where
date >= regexp_replace(date_sub(now(),30),'-','')
在数据库里面的时间格式为【文本】,形式【20211211】,需要选择距离现在一个月以内的数据
select
*
from
table
where
date >= regexp_replace(date_sub(now(),30),'-','')