时间:2021-07-01 10:21:17 帮助过:111人阅读
这样我们就获取到了小写字母,当然我们还可以获取大写字母:
SELECT @temp=@temp+SUBSTRING(ch, sv.number, 1) FROM (SELECT @s AS ch) t CROSS APPLY [master].dbo.spt_values AS sv WHERE sv.type = ‘P‘ AND sv.number BETWEEN 1 AND LEN(ch) AND ASCII(SUBSTRING(ch, sv.number, 1)) BETWEEN ASCII(‘A‘) AND ASCII(‘Z‘) SELECT @temp
https://www.jb51.net/article/140131.htm
SqlServer 获取字符串中小写字母的sql语句
标签:开始 cross number str sel master arch val declare