Home  >  Article  >  Database  >  Oracle函数(把每个单词首个字母变为大写)

Oracle函数(把每个单词首个字母变为大写)

WBOY
WBOYOriginal
2016-06-07 16:58:252473browse

Oracle函数(把每个单词首个字母变为大写)NLS_INITCAP(x[,y])【功能】返回字符串并将字符串的第一个字母变为大写,其它字母小写;【

Oracle函数(把每个单词首个字母变为大写)

NLS_INITCAP(x[,y])

【功能】返回字符串并将字符串的第一个字母变为大写,,其它字母小写;

【参数】x字符型表达式

【参数】Nls_param可选,查询数据级的NLS设置:select * from nls_database_parameters;

例如:指定排序的方式(nls_sort=) 。

nls_sort=SCHINESE_RADICAL_M(部首、笔画) nls_sort=SCHINESE_STROKE_M(笔画、部首SCHINESE_PINYIN_M(拼音))

【返回】字符型

【示例】 select nls_initcap('ab cde') "test", nls_initcap('a c b d e','nls_sort= SCHINESE_PINYIN_M') "test1" from dual;

返回:Ab Cde, A C B D E

select nls_initcap('ab cde') "test", nls_initcap('a c b d e','NLS_LANGUAGE=AMERICAN') "test1" from dual;

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn