代码如下: /* –SQLServer中将字符串首字母设置大写: –作者:jinjazz /csdn –SQLServer2005启用OLEAutomation sp_configure ‘show advanced options’, 1; go RECONFIGURE; go sp_configure ‘Ole Automation Procedures’, 1; go RECONFIGURE; go */ use tempdb go if (object_id (‘fn_toTitleCase’ ) is not null ) drop function dbo . fn_toTitle