char_matchcount
This parameter is used to return the number of characters in str1 that appear in str2.
Syntax
char_matchcount(string <str1>, string <str2>)
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
str1, str2 |
Yes |
STRING |
str1 and str2 to be calculated |
Return Values
The return value is of the BIGINT type.
![](https://support.huaweicloud.com/intl/en-us/sqlreference-dli/public_sys-resources/note_3.0-en-us.png)
If the value of str1 or str2 is NULL, NULL is returned.
Example Code
The value 3 is returned.
select char_matchcount('abcz','abcde');
The value NULL is returned.
select char_matchcount(null,'abcde');
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot