Oracle date function for the previous month

后端 未结 6 2109
醉梦人生
醉梦人生 2021-02-18 17:25

I have the query below where the date is hard-coded. My objective is to remove the harcoded date; the query should pull the data for the previous month when it runs.

<         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-18 18:06

    Getting last nth months data retrieve

    SELECT * FROM TABLE_NAME 
    WHERE DATE_COLUMN BETWEEN '&STARTDATE' AND '&ENDDATE'; 
    

提交回复
热议问题