更新时间:2026-07-08 GMT+08:00
分享

char_matchcount

char_matchcount函数用于计算str1中有多少个字符出现在str2中。

命令格式

char_matchcount(string , string ) 

参数说明

参数

是否必选

参数类型

说明

str1、str2

STRING

待计算的字符串str1、str2。

返回值说明

返回BIGINT类型。

str1或str2值为NULL时,返回NULL。

示例代码

返回3。

select char_matchcount('abcz','abcde'); 

返回NULL。

select char_matchcount(null,'abcde');

相关文档