//长度 length(catName) //取第一位字符 substring(catName,1,1) //转大写 upper(substring(catName,1,1)) //转小写 lower(substring(catName,1,length(catName))) //拼接concat("","",""),前两个参数是需要拼接的字符串,最后一个为以什么拼接比如: mysql> concat("a","b","===") mysql> a===b concat(upper(substring(catName,1,1)),lower(substring(catName,1,length(catName))),"")
mysql> select concat(upper(substring(catName,1,1)),lower(substring(catName,1,length(catName))),"") from cat;
替换
//把a替换成A mysql> select replace(catName,'a','A') from cat;