SELECT TO_CHAR(TO_DATE((SELECT DATA_DATE FROM MC_DATA_DATE),'YYYYMMDD' ) - ( SELECT 6 FROM DUAL),'YYYYMMDD') FROM DUAL
SELECT DATA_DATE FROM MC_DATA_DATE 查询的日期为:20160605,先将日期转换为to_date,再将日期转换减6天,6天之前为20160530
上面是的结果是转换为 20160530.
@CHUNGKING
原文链接:https://www.f2er.com/oracle/213903.html