sqlserver 首个字母大写,其它均变小写
// An highlighted block
select (upper(left('apple',1)))+lower(stuff('apple',1,1,''))
结果:
field1
Apple
mysql 首个字母大写,其它均变小写
// An highlighted block
select CONCAT(upper(left('apple',1)),lower(INSERT('apple',1,1,''))) as str
update t_tree_city_copy set nvc_name=CONCAT(upper(left(nvc_name,1)),lower(INSERT(nvc_name,1,1,'')))
where i_identifier BETWEEN 1 and 100
结果:
str
Apple