SQL> select next_day(sysdate,'星期一') from dual;
select next_day(sysdate,'星期一') from dual
*
第 1 行出现错误:
ORA-01846: 周中的日无效
SQL> alter session set nls_date_language='simplified chinese';
会话已更改。
SQL> select next_day(sysdate,'星期一') from dual;
NEXT_DAY(SYSDATE,'
-------------------
2013-10-28 12:57:38
SQL> select * from v$nls_parameters where parameter like '%NLS_DATE%';
PARAMETER VALUE
-------------------- -----------------------------------------------------
-----
NLS_DATE_FORMAT yyyy-mm-dd hh24:mi:ss
NLS_DATE_LANGUAGE SIMPLIFIED CHINESE
SQL> alter session set nls_date_language=american;
会话已更改。
SQL> select next_day(sysdate,'monday') from dual;
NEXT_DAY(SYSDATE,'M
-------------------
2013-10-28 13:55:54
SQL> select * from v$nls_parameters where parameter like '%NLS_DATE%';
PARAMETER VALUE
-------------------- -----------------------------------------------------
-----
NLS_DATE_FORMAT yyyy-mm-dd hh24:mi:ss
NLS_DATE_LANGUAGE AMERICAN