标签:默认 har select comm 会话 mon end calendar EDA
select sysdate from dual
已用时间: 00: 00: 00.00 SQL> select sysdate from dual; SYSDATE -------------- 14-4月 -19 已用时间: 00: 00: 00.00
SQL> select * from emp where hiredate="17-11月-81"; select * from emp where hiredate="17-11月-81" * 第 1 行出现错误: ORA-00904: "17-11月-81": 标识符无效 已用时间: 00: 00: 00.00 SQL> select * from emp where hiredate=‘17-11月-81‘; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- -------------- ---------- ---------- ---------- 7839 KING PRESIDENT 17-11月-81 5000 10 已用时间: 00: 00: 00.01
SQL> select * from v$nls_parameters; PARAMETER VALUE ---------------------------------------------------------------- ---------------------------------------------------------------- NLS_LANGUAGE SIMPLIFIED CHINESE NLS_TERRITORY CHINA NLS_CURRENCY ¥ NLS_ISO_CURRENCY CHINA NLS_NUMERIC_CHARACTERS ., NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE SIMPLIFIED CHINESE NLS_CHARACTERSET ZHS16GBK NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY ¥ NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE 已选择19行。 已用时间: 00: 00: 00.01
SQL> ed 已写入 file afiedt.buf 1* alter session set NLS_DATE_FORMAT=‘yyyy-mm-dd‘ SQL> / 会话已更改。 已用时间: 00: 00: 00.00 SQL> select sysdate from dual; SYSDATE ---------- 2019-04-14 已用时间: 00: 00: 00.00 SQL>
改回系统默认格式
已写入 file afiedt.buf 1* alter session set NLS_DATE_FORMAT = ‘DD-MON-RR‘ SQL> / 会话已更改。 已用时间: 00: 00: 00.00 SQL>
标签:默认 har select comm 会话 mon end calendar EDA
原文地址:https://www.cnblogs.com/xiangtingshen/p/10707253.html