0
信我将如何找到一个字符串的前四个字母只包含字母(大写或小写?)检查在字符串中的前导字符是使用SQL
我已经试过
DECLARE @someString VARCHAR(40) = 'B331hBlahBlahBlah'
IF(SUBSTRING(@someString, 1, 4) LIKE '[A-Za-z]%')
print 'this is all text, no numbers in here'
else
print 'this string contains numbers'
但输出是“这是所有的文字,在这里没有号码”
感谢所有帮助
是这个SQL服务器? –