网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > MySQL
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 112.87.93.182
Old 2015-03-31, 09:30 AM
Hamel Hamel is offline
初级会员
 
Join Date: 2010-12-13
Posts: 1
Hamel 现在声名狼藉
Default Capitalize first letter. MySQL

It's almost the same, you just have to change to use the CONCAT() function instead of the + operator :

Code:
UPDATE tb_Company
SET CompanyIndustry = CONCAT(UCASE(LEFT(CompanyIndustry, 1)), 
SUBSTRING(CompanyIndustry, 2));
This would turn hello to Hello, wOrLd to WOrLd, BLABLA to BLABLA, etc. If you want to upper-case the first letter and lower-case the other, you just have to use LCASE function :

Code:
UPDATE tb_Company
SET CompanyIndustry = CONCAT(UCASE(LEFT(CompanyIndustry, 1)), 
LCASE(SUBSTRING(CompanyIndustry, 2)));
Note that UPPER and UCASE do the same thing.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql 帮助文档使用 Haddam MySQL 0 2014-11-26 06:43 PM
关于PHP中操作MySQL数据库的一些要注意的问题 smiling 代码交流 0 2006-12-15 07:22 PM
如何导入导出MySQL数据库 topvip 建站交流 0 2006-10-10 07:43 AM
mysql安装与简单使用 sunshine 服务器环境搭建 0 2006-01-11 07:29 PM
winxp下安装全新的apache,php(5.0),mysql(5.0)... topvip 服务器环境搭建 0 2006-01-08 10:28 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 02:05 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.