我对 Oracle 有点不满意
那我下面的SQL
select * from orders where
trunc(ordered_date)
between
to_date('01-JAN-12')
and
to_date('07-JAN-12')
Ordered_date 是 DATE 数据类型
是否给出以下错误。
Error starting at line 1 in command:
select * from orders
where
trunc(ordered_date)
between
to_date('01-JAN-12')
and
to_date('07-JAN-12')
Error report:
SQL Error: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
01841. 00000 - "(full) year must be between -4713 and +9999, and not be 0"
*Cause: Illegal year entered
*Action: Input year in the specified range
我很困惑是什么导致了 mu 代码中的这个错误。
任何输入都会很棒。
谢谢 !!!