ascii
This function is used to return the ASCII code of the first character in str.
Syntax
ascii(string <str>)
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
str |
Yes |
STRING |
If the value is of the BIGINT, DOUBLE, DECIMAL, or DATETIME type, the value is automatically converted to the STRING type for calculation. Example: ABC |
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 str is not of the STRING, BIGINT, DOUBLE, DECIMAL, or DATETIME type, an error is reported.
- If the value of str is NULL, NULL is returned.
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