This is related to making oracle sorting case-insensitive. Most of the solutions I have seen mentions setting below session params :
ALTER SESSION SET NLS_COMP = LINGUISTIC;
ALTER SESSION SET NLS_SORT = BINARY_CI;
By default NLS_COMP is BINARY.
I found that if I just set NLS_SORT to BINARY_CI without setting the NLS_COMP to LINGUISTIC, it still works, i.e oracle sort becomes case-insensitive. Is there any advantage to setting NLS_COMP param ?
NLS_COMPandNLS_SORThave slightly different effects.NLS_COMPis, as the name implies, for comparisons.NLS_SORTis, as the name implies, for sorting. SettingNLS_COMPtoLINGUISTICcauses comparisons to follow the sorting rules, causes comparisons to use theNLS_SORTsetting. You can see the difference when you try:With
NLS_COMP = BINARY, the comparison gives false. WithNLS_COMP = LINGUISTICandNLS_SORT = BINARY_CI, the comparison gives true.Whether you should set that depends on what results you want to get from your queries.