在SQL中怎么判断当前日期是上一个月的,具体的语法应该怎么写才是对的

请问下各位兄弟们,在SQL中怎么判断当前日期是上一个月的,具体的语法应该怎么写才是对的,

select * from 表名 where convert(char (10),dateadd (month,-1, 当前日期),23)=上个月的时间

convert(char (10),dateadd (month,-1, 当前日期),23)// 当前日期减去一个月 就是上个月时间

读不懂题目了,当期日期是上个月的什么啊

当前日期月份 = 当前时间月份 - 1


select * from table 
where 1 = 1 
and to_char("当前时间"::timestamp,'yyyymm') =   to_char(now()::timestamp + '-1 month','yyyymm')

PS: 使用的PGSQL 原理类似

selete * from table where month(当前时间)=month(date())-1