例如查询 “_” 的个数:
select len(WordType) - len(replace(WordType, '_', '')) [length] ,* from T1 order by len(WordType)
思路:将“_” 替换成 “空串” 然后用原字符串的长度减去替换后的长度
例如查询 “_” 的个数:
select len(WordType) - len(replace(WordType, '_', '')) [length] ,* from T1 order by len(WordType)
思路:将“_” 替换成 “空串” 然后用原字符串的长度减去替换后的长度