中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle中如何修改NLS_DATE_LANGUAGE

發布時間:2021-11-09 11:24:05 來源:億速云 閱讀:586 作者:小新 欄目:關系型數據庫

這篇文章主要介紹oracle中如何修改NLS_DATE_LANGUAGE,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

一、 NLS_DATE_LANGUAGE

下面是臨時修改nls_date_language參數為中文,以方便當前會話導入'08-12月-13 03.16.19.119000 下午'之類的數據。

報錯ORA-01843: not a valid month解決

1、查看NLS_TIMESTAMP_FORMAT和NLS_DATE_LANGUAGE參數和SYSTIMESTAMP 數據格式

SQL> select * from v$nls_parameters;

PARAMETER                                                        VALUE

---------------------------------------------------------------- ----------------------------------------------------------------

NLS_LANGUAGE                                                     AMERICAN

NLS_TERRITORY                                                    AMERICA

NLS_CURRENCY                                                     $

NLS_ISO_CURRENCY                                                 AMERICA

NLS_NUMERIC_CHARACTERS                                           .,

NLS_CALENDAR                                                     GREGORIAN

NLS_DATE_FORMAT                                                  DD-MON-RR

NLS_DATE_LANGUAGE                                                AMERICAN

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 rows selected

SQL> SELECT SYSTIMESTAMP FROM DUAL;

SYSTIMESTAMP

--------------------------------------------------------------------------------

11-FEB-18 09.59.08.147761 AM +08:00

2、確定NLS_TIMESTAMP_FORMAT格式

如果參數NLS_TIMESTAMP_FORMAT格式不是DD-MON-RR HH.MI.SSXFF AM首先要調整該參數

     調整該參數的命令:alter session set NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH.MI.SS.FF8 AM';

    注:該命令只是當前會話有用。

3、確定NLS_DATE_LANGUAGE格式

查看NLS_DATE_LANGUAGE是SIMPLIFIED CHINESE還是AMERICA,如果是AMERICA需要修改成SIMPLIFIED CHINESE,

     才能顯示中文上下午和月份,當前會話修改方法

SQL> ALTER SESSION SET nls_date_language='SIMPLIFIED CHINESE';

    注:該命令只是當前會話有用。

4、修改后參數

SQL> select * from v$nls_parameters;

/

PARAMETER                                                        VALUE

---------------------------------------------------------------- ----------------------------------------------------------------

NLS_LANGUAGE                                                     AMERICAN

NLS_TERRITORY                                                    AMERICA

NLS_CURRENCY                                                     $

NLS_ISO_CURRENCY                                                 AMERICA

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

5、查看類型:

SQL> select systimestamp from dual;

/

SYSTIMESTAMP

--------------------------------------------------------------------------------

11-2月 -18 09.38.29.190818 上午 +08:00

6、導入數據:

SQL> @

Importing table SYS_AREA...

以上是“oracle中如何修改NLS_DATE_LANGUAGE”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

扎兰屯市| 教育| 宝应县| 广平县| 彰武县| 旺苍县| 禹州市| 新乐市| 张家界市| 德令哈市| 大连市| 巨野县| 汨罗市| 健康| 昌黎县| 滦南县| 曲沃县| 苍南县| 团风县| 枣阳市| 万安县| 昌图县| 山西省| 商洛市| 峨眉山市| 左云县| 昌宁县| 泗水县| 太和县| 静海县| 都兰县| 江西省| 佳木斯市| 周至县| 开封县| 和田市| 阜阳市| 汉寿县| 日喀则市| 商都县| 崇仁县|