`

ORA-01810: format code appears twice

阅读更多

《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')

 

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

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics