Previous |
Next |
Specifies: Default language of the database. Default conventions for:
Language for server messages
Language for names and abbreviations of days and months that are specified in the SQL functions TO_CHAR
and TO_DATE
Symbols for default-language equivalents of AM, PM, AD, and BC
Default sorting order for character data when the ORDER
BY
clause is specified
Writing direction
Affirmative and negative response strings (for example, YES
and NO
)
Acceptable Values: Any language name that Oracle supports. For a list, see Oracle Database Globalization Support Guide.
Default Value: Set by NLS_LANG
, described in "About Locale and the NLS_LANG Parameter".
Sets default values of:
NLS_DATE_LANGUAGE
, described in "About the NLS_DATE_LANGUAGE Parameter".
NLS_SORT
, described in "About the NLS_SORT Parameter".
The following example shows how setting NLS_LANGUAGE
to ITALIAN
and GERMAN
affects server messages and month abbreviations.
To try this example in SQL Developer, enter the statements and queries in the SQL Worksheet. For information about the SQL Worksheet, see "Running Queries in SQL Developer". The results shown here are from SQL*Plus; their format is slightly different in SQL Developer.
NLS_LANGUAGE Affects Server Message and Month Abbreviations
Note the current value of NLS_LANGUAGE
.
For instructions, see "Viewing NLS Parameter Values".
If the value in step 1 is not ITALIAN
, change it:
ALTER SESSION SET NLS_LANGUAGE=ITALIAN;
Query a nonexistent table:
SELECT * FROM nonexistent_table;
Result:
SELECT * FROM nonexistent_table
*
ERROR at line 1:
ORA-00942: tabella o vista inesistente
Run this query:
SELECT LAST_NAME, HIRE_DATE FROM EMPLOYEES WHERE EMPLOYEE_ID IN (111, 112, 113);
Result:
LAST_NAME HIRE_DATE ------------------------- --------- Sciarra 30-SET-97 Urman 07-MAR-98 Popp 07-DIC-99 3 rows selected.
Change the value of NLS_LANGUAGE
to GERMAN
:
ALTER SESSION SET NLS_LANGUAGE=GERMAN;
Repeat the query from step 3.
Result:
SELECT * FROM nonexistent_table
*
ERROR at line 1:
ORA-00942: Tabelle oder View nicht vorhanden
Repeat the query from step 4.
Result:
LAST_NAME HIRE_DATE ------------------------- --------- Sciarra 30-SEP-97 Urman 07-MRZ-98 Popp 07-DEZ-99 3 rows selected.
Set NLS_LANGUAGE
to the value that it had at step 1.