Previous |
Next |
Specifies: Local currency symbol (the character string returned by the numeric format element L
).
Acceptable Values: Any valid currency symbol string.
Default Value: Set by NLS_TERRITORY
, described in "About the NLS_TERRITORY Parameter".
The following example changes the value of NLS_CURRENCY
, overriding the default value set by NLS_TERRITORY
.
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_CURRENCY Overrides NLS_TERRITORY
Note the current values of NLS_TERRITORY
and NLS_CURRENCY
.
For instructions, see "Viewing NLS Parameter Values".
If the valueof NLS_TERRITORY
in step 1 is not AMERICA
, change it:
ALTER SESSION SET NLS_TERRITORY=AMERICA;
Run this query:
SELECT TO_CHAR(salary, 'L099G999D99') "Salary" FROM EMPLOYEES WHERE salary > 13000;
Result:
Salary --------------------- $024,000.00 $017,000.00 $017,000.00 $014,000.00 $013,500.00
Change the value of NLS_CURRENCY
to '¥'
:
ALTER SESSION SET NLS_CURRENCY='¥';
Run this query:
SELECT TO_CHAR(salary, 'L099G999D99') "Salary" FROM EMPLOYEES WHERE salary > 13000;
Result:
Salary --------------------- ¥024,000.00 ¥017,000.00 ¥017,000.00 ¥014,000.00 ¥013,500.00
Set NLS_TERRITORY
and NLS_CURRENCY
to the values that they had at step 1.