51、查找字符串'10,A,B' 中逗号','出现的次数cnt

1、题目描述

查找字符串'10,A,B' 中逗号','出现的次数cnt。

2、代码

SELECT (length("10,A,B")-length(replace("10,A,B",",","")))/length(",") AS cnt;

 

posted @ 2020-04-17 16:21  guoyu1  阅读(380)  评论(0编辑  收藏  举报