思想:
先把a通过replace把a先替换成空格,然后再相减两个字符串,可以得出a的数目
select len('abacadaeafa')-len(replace('abacadaeafa','a',''))
输出:6
select 'a,'+convert(varchar(4),(len('abacadaeafa')-len(replace('abacadaeafa','a',''))))
输出:a,6
先把a通过replace把a先替换成空格,然后再相减两个字符串,可以得出a的数目
select len('abacadaeafa')-len(replace('abacadaeafa','a',''))
输出:6
select 'a,'+convert(varchar(4),(len('abacadaeafa')-len(replace('abacadaeafa','a',''))))
输出:a,6
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}