SQL查询将首字母更改为大写? [英] Sql query to change first letter to upper case?

查看:474
本文介绍了SQL查询将首字母更改为大写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请向我发送查询,以将sql server 2005中的首字母更改为大写.

谢谢,

Viswanathan.m

Hi,

Kindly send me the query to change the first letter to upper case in sql server 2005.

Thanks,

Viswanathan.m

推荐答案

尝试将第一个字符大写SQL Server [ ^ ].


Declare @FirstChatCapital nvarchar(20)
Set @FirstChatCapital = 'codeproject'
Select upper(substring(@FirstChatCapital,1,1))+lower(substring(@FirstChatCapital,2,len(@FirstChatCapital))) 



您可以将表列名称替换为@FirstChatCapital变量.



You can replace your table column name with @FirstChatCapital variable.


这篇关于SQL查询将首字母更改为大写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆