Changing NLS Parameter Values

You can change the value of one or more NLS parameters in any of the following ways.

See Also:

Changing NLS Parameter Values for All SQL Developer Connections

You can change the values of NLS parameters for all SQL Developer connections, current and future.

Steps to change National Language Support Parameter values:

  1. From the SQL Developer menu Tools, select Preferences.

  2. In the Preferences window, in the left frame, expand Database.

  3. In the list of database preferences, click NLS.

    A list of NLS parameters and their current values appears. The value fields are menus.

  4. From the menu to the right of each parameter whose value you want to change, select the desired value.

  5. Click OK.

    The NLS parameters now have the values that you specified. To verify these values, see “Viewing NLS Parameter Values”.

Note: If the NLS parameter values do not reflect your changes, click the icon Run Report.

See Also: Oracle SQL Developer User’s Guide for more information about SQL Developer preferences

Changing NLS Parameter Values for the Current SQL Function Invocation

SQL functions whose behavior depends on the values of NLS parameters are called locale-dependent. Some locale-dependent SQL functions have optional NLS parameters.

The local-dependent functions that have optional NLS parameters are:

In all of the preceding functions, you can specify these NLS parameters:

In the NLSSORT function, you can also specify these NLS parameters:

To specify NLS parameters in a function, use the following syntax:

'parameter=value' ['parameter=value']...

Suppose that you want NLS_DATE_LANGUAGE to be AMERICAN when this query is evaluated:

SELECT last_name FROM employees WHERE hire_date > '01-JAN-1999';

You can set NLS_DATE_LANGUAGE to AMERICAN before running the query:

ALTER SESSION SET NLS_DATE_LANGUAGE=American;
SELECT last_name FROM employees WHERE hire_date > '01-JAN-1999';

Alternatively, you can set NLS_DATE_LANGUAGE to AMERICAN inside the query, using the locale-dependent SQL function TO_DATE with its optional NLS_DATE_LANGUAGE parameter:

SELECT last_name FROM employees
WHERE hire_date > TO_DATE('01-JAN-1999', 'DD-MON-YYYY',
                          'NLS_DATE_LANGUAGE=AMERICAN');

Tip: Using session default values for NLS parameters in SQL functions usually results in better performance. Therefore, specify optional NLS parameters in locale-dependent SQL functions only in SQL statements that must not use the default NLS parameter values.

See Also: Oracle Database Globalization Support Guide for more information about locale-dependent SQL functions with optional NLS parameters