ITeye博客

ORA-01810: format code appears twice

e_e · 2016-08-05 15:07 · oracle · 数据库 · Markdown

《Oracle就是矫情》

错误:

select * from SCORE_ORDER t where app_create_time between to_date('2016/08/04 00:00:00','yyyy/MM/dd HH:mm:ss') and to_date('2016/08/04 23:00:00','yyyy/MM/dd HH:mm:ss')

 

查询时报错ORA-01810: format code appears twice

原因是月用MM,分钟用mm,在oracle中不允许

 

更正:

select * from SCORE_ORDER t where app_create_time between to_date('2016/08/04 00:00:00','yyyy/MM/dd HH:mi:ss') and to_date('2016/08/04 23:00:00','yyyy/MM/dd HH:mi:ss')

 

 ==============================================================================

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。