这串Oracle语句哪错了呀?

select * from sal_order
where sale_date between to_date('2021-07-12 00:00:00','yyyy_mm_dd hh24:mi:ss') and to_date('2021-07-14 23:00:00','yyyy_mm_dd hh24:mi:ss')
order by sale_date desc

img

pattern写的不对。改成下面的就可以了。
如有帮助,请点击我回答右上角【采纳】按钮。
select * from sal_order
where sale_date between to_date('2021-07-12 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2021-07-14 23:00:00','yyyy-mm-dd hh24:mi:ss')
order by sale_date desc

是'yyyy-mm-dd hh24:mi:ss'不是'yyyy_mm_dd hh24:mi:ss'