How to count the number of times a character appears in a SQL column?

前端 未结 2 1398
借酒劲吻你
借酒劲吻你 2020-12-14 00:39

For a user logging table I have in a SQL database, I track the some of the parameters off of a report request. The report allows multiple ID\'s to be passed to it and I sto

2条回答
  •  粉色の甜心
    2020-12-14 01:07

    It seems the quick and dirty way to answer the question you've been asked would be to do this:

    select 
        count(*) as cnt
    FROM 
        [table]
    WHERE 
        RequestedReportParams Like '%,%,%'
    

提交回复
热议问题