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 Environment-- select the last name of those employees whose last name begin with CSELECT last_name FROM employeesWHERE last_name LIKE 'C%' ORDER BY last_name;The output of Example 11–12 appears:LAST_NAME--------------CabrioCambraultCambraultColmenaresChenChungNote that the order of last names in the output from the SELECT statement inExample 11–11 and Example 11–12 is different.See Also:■<strong>Oracle</strong> Database Globalization Support Guide for more informationon supported linguistic sorts.11.2.8.2 NLS_COMPWhen using comparison operators, characters are compared according to their binarycodes in the designated encoding scheme. A character is greater than another if it has ahigher binary code. Because the binary sequence of characters may not match thelinguistic sequence for a particular language, such comparisons might not belinguistically correct.The value of the NLS_COMP parameter affects the comparison behavior of <strong>SQL</strong>operations. The value can be BINARY (default) or LINGUISTIC. You can use NLS_COMP to avoid the cumbersome process of using the NLSSORT function in <strong>SQL</strong>statements when you want to perform a linguistic comparison instead of a binarycomparison. When NLS_COMP is set to LINGUISTIC, <strong>SQL</strong> operations perform alinguistic comparison based on the value of NLS_SORT.Example 11–13 and Example 11–14 illustrate the effect of performing a binarycomparison follow by a Spanish linguistic sensitive comparison against the employeenames. In Example 11–13 the NLS_COMP parameter is set to BINARY while NLS_SORTis set to Spanish.Example 11–13 Setting NLS_COMP to BINARY-- set NLS_SORT and NLS_COMP for this user sessionALTER SESSION SET NLS_SORT=spanish_m NLS_COMP=binary;-- 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–13 appears:LAST_NAME--------------CabrioCambraultCambrault11-16 <strong>SQL</strong> <strong>Developer</strong> Online Help

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

Saved successfully!

Ooh no, something went wrong!