MySQL function?

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Derek Neighbors
日付:  
題目: MySQL function?
Matt Alexander said:
> Mike Starke said:
>>
>> Is there a function in MySQL similar to that in Excel's "proper()"?
>>
>> For instance, I would like to do a select on a column that has
>> all CAPS and display the query in proper case (Mike versus MIKE).
>
> select concat(ucase(left(first_name,1)),lcase(SUBSTRING(first_name,2)))
> as First_Name from myTable;


This falls down if my first name is MARY ANN or LAURIE JEAN, etc...

As stated you could handle programmatically (someone gave a suggestion if
the language used to retrieve the data was php) or utter bastardazation of
string functions in mysql.

-Derek