更新时间:2023-09-22 GMT+08:00
分享

char_matchcount

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

命令格式

char_matchcount(string <str1>, string <str2>)

参数说明

表1 参数说明

参数

是否必选

参数类型

说明

str1、str2

STRING

待计算的字符串str1、str2。

返回值说明

返回BIGINT类型。

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

示例代码

返回3。

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

返回NULL。

select char_matchcount(null,'abcde');
分享:

    相关文档

    相关产品