oracle字符型函数INITCAP NLS_INITCAP

INITCAP(c1字符型表达式)

【功能】返回字符串并将字符串的第一个字母变为大写,其它字母小写;
【例】select initcap('smith abc aBC') upp from dual;
【结果】Smith Abc Abc

NLS_INITCAP(x[,y])

【功能】返回字符串并将字符串的变为小写;
【参数】x字符型表达式;Nls_param可选,指定排序的方式(nls_sort=) 。
        查询数据级的NLS设置:select * from nls_database_parameters;
        SCHINESE_RADICAL_M(部首、笔画)
        SCHINESE_STROKE_M(笔画、部首SCHINESE_PINYIN_M(拼音))
【例】select nls_initcap('ab cde'),nls_initcap('a c h d e','nls_sort= SCHINESE_RADICAL_M') from dual;
【结果】Ab Cde ;A C H D E

猜你喜欢

转载自wangjingyi.iteye.com/blog/2034219