项目中查询数据库中,某个字段内特定字符出现次数
select [detail],eatString = len([detail]) - len(replace([detail],'吃',''))
from [VWPFCC_BDE].[dbo].[t_bd_line_shift_plan] WITH(NOLOCK)
where is_delete = 0
查询 [detail] 字段里 ‘吃’ 的次数,结果如下
项目中查询数据库中,某个字段内特定字符出现次数
select [detail],eatString = len([detail]) - len(replace([detail],'吃',''))
from [VWPFCC_BDE].[dbo].[t_bd_line_shift_plan] WITH(NOLOCK)
where is_delete = 0
查询 [detail] 字段里 ‘吃’ 的次数,结果如下