ORA-01861: 文字与格式字符串不匹配
ORA-01861: literal does not match format string
Cause: Literals in the input must be the same length as literals in the format string (with the exception of leading whitespace). If the "FX" modifier has been toggled on, the literal must match exactly, with no extra whitespace.
Action: Correct the format string to match the literal.
在SQL语句中日期类型字段值的设置、比较、显示如果直接使字符串方式('2009-02-04'),或者 使用to_date('2009-02-04')方式, 没有指定日期格式,则会报ORA-01861错误。
解决方法:使用to_date('2009-02-04' , 'yyyy-mm-dd') 替代以上方式。