12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Setting up the Globalization Support EnvironmentChenChungColmenaresIn Example 11–14 the NLS_COMP parameter is set to LINGUISTIC while NLS_SORT isset to Spanish.Example 11–14 Setting NLS_COMP to BINARY-- set NLS_SORT and NLS_COMP for this user sessionALTER SESSION SET NLS_SORT=spanish_m NLS_COMP=linguistic;-- select the last name of those employees whose last name begin with CSELECT last_name FROM employeesWHERE last_name LIKE 'C%';The output of Example 11–14 appears:LAST_NAME--------------CabrioCambraultCambraultColmenaresNote the difference in the output of Example 11–13 and Example 11–14. In Spanish chis treated as a separate character following c so ch is excluded when a Spanishlinguistic sensitive comparison is performed in Example 11–14.11.2.8.3 Case and Accent Insensitive SearchingOperations inside a database are sensitive to the case and the accents of the characters.Sometimes you might need to perform case-insensitive or accent-insensitivecomparisons. Use the NLS_SORT session parameter to specify a case-insensitive oraccent insensitive sort.To specify a case-insensitive or accent-insensitive sort:■Append _CI to an <strong>Oracle</strong> sort name for a case-insensitive sort. For example:BINARY_CI: accent sensitive and case insensitive binary sortGENERIC_M_CI: accent sensitive and case insensitive GENERIC_M sort■Append _AI to an <strong>Oracle</strong> sort name for an accent-insensitive and case-insensitivesort. For example:BINARY_AI: accent insensitive and case insensitive binary sortFRENCH_M_AI: accent insensitive and case insensitive FRENCH_M sort11.2.9 Length SemanticsIn single-byte character sets, the number of bytes and the number of characters in astring are the same. In multibyte character sets, a character or code point consists ofone or more bytes. Calculating the number of characters based on byte lengths can bedifficult in a variable-width character set. Calculating column lengths in bytes is calledbyte semantics, while measuring column lengths in characters is called charactersemantics.Working in a Global Environment 11-17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!