有误:insert into newhire values ('corey','MA','01-Jan-01',20000);
改为:insert into newhire values ('corey','MA',to_date('2001-01-01','yyyymdd-dd'),20000)
或 insert into newhire values ('corey','MA',to_date('01-Jan-01','dd-mon-yy'),20000)
日期格式冲突问题
输入的格式要看你安装的ORACLE字符集的类型, 比如: US7ASCII, date格式的类型就是: '01-Jan-01'
alter system set NLS_DATE_LANGUAGE = American
alter session set NLS_DATE_LANGUAGE = American
或者在to_date中写
select to_char(to_date('2002-08-26','yyyy-mm-dd'),'day','NLS_DATE_LANGUAGE = American') from dual;
注意我这只是举了NLS_DATE_LANGUAGE,当然还有很多,
可查看
select * from nls_session_parameters
select * from V$NLS_PARAMETERS