ORA-01843: not a valid month 错误

insert into ......的场合发生ORA-01843: not a valid month  错误

原因是timestamp类型不一致。timestamp的日期格式为YYYY-MM-DD HH24:MI:SS.FF6

解决方法:

alter session set nls_date_language='AMERICAN';
alter session set nls_timestamp_format = 'YYYY-MM-DD HH24:MI:SS.FF';


查看回话参数:

select * from nls_session_parameters where parameter='NLS_DATE_LANGUAGE'

你可能感兴趣的:(ORA-01843: not a valid month 错误)