PolarDB-X 1.0-SQL 手册-函数-字符串函数-阿里云开发者社区

开发者社区> -技术小助手-> 正文

PolarDB-X 1.0-SQL 手册-函数-字符串函数

简介: DRDS 支持如下字符串函数:
+关注继续查看
函数名描述
ASCII()Return numeric value of left-most character
BIN()Return a string containing binary representation of a number
BIT_LENGTH()Return length of argument in bits
CHAR()Return the character for each integer passed
CHAR_LENGTH()Return number of characters in argument
CHARACTER_LENGTH()Synonym for CHAR_LENGTH()
CONCAT()Return concatenated string
CONCAT_WS()Return concatenate with separator
ELT()Return string at index number
EXPORT_SET()Return a string such that for every bit set in the value bits, you get an on string and for every unset bit, you get an off string
FIELD()Return the index (position) of the first argument in the subsequent arguments
FORMAT()Return a number formatted to specified number of decimal places
FROM_BASE64()Decode to a base-64 string and return result
HEX()Return a hexadecimal representation of a decimal or string value
INSERT()Insert a substring at the specified position up to the specified number of characters
INSTR()Return the index of the first occurrence of substring
LCASE()Synonym for LOWER()
LEFT()Return the leftmost number of characters as specified
LENGTH()Return the length of a string in bytes
LIKESimple pattern matching
LOCATE()Return the position of the first occurrence of substring
LOWER()Return the argument in lowercase
LPAD()Return the string argument, left-padded with the specified string
LTRIM()Remove leading spaces
MAKE_SET()Return a set of comma-separated strings that have the corresponding bit in bits set
MID()Return a substring starting from the specified position
NOT LIKENegation of simple pattern matching
NOT REGEXPNegation of REGEXP
OCT()Return a string containing octal representation of a number
OCTET_LENGTH()Synonym for LENGTH()
ORD()Return character code for leftmost character of the argument
POSITION()Synonym for LOCATE()
QUOTE()Escape the argument for use in an SQL statement
REGEXPWhether string matches regular expression
REPEAT()Repeat a string the specified number of times
REPLACE()Replace occurrences of a specified string
REVERSE()Reverse the characters in a string
RIGHT()Return the specified rightmost number of characters
RLIKEWhether string matches regular expression
RPAD()Append string the specified number of times
RTRIM()Remove trailing spaces
SOUNDEX()Return a soundex string
SPACE()Return a string of the specified number of spaces
STRCMP()Compare two strings
SUBSTR()Return the substring as specified
SUBSTRING()Return the substring as specified
SUBSTRING_INDEX()Return a substring from a string before the specified number of occurrences of the delimiter
TO_BASE64()Return the argument converted to a base-64 string
TRIM()Remove leading and trailing spaces
UCASE()Synonym for UPPER()
UNHEX()Return a string containing hex representation of a number
UPPER()Convert to uppercase
WEIGHT_STRING()Return the weight string for a string

不支持函数列表

与 MySQL5.7 相比,暂不支持如下字符串函数:

函数名描述
FIND_IN_SET()Return the index position of the first argument within the second argument
LOAD_FILE()Load the named file
MATCHPerform full-text search
SOUNDS LIKECompare sounds

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
JavaScript字符串函数大全
JS自带函数 1.Asc(x),Chr(x):转换字符,字符码 2.Filter:搜寻字符串数组中的特定字符串 格式:v=filter(x,s[,include[,compare]]) 实例: Dim x()={"kjwang","wangkj","peter"} Dim v v=fi...
1046 0
PolarDB-X 1.0-SQL 手册-函数-窗口函数
传统的Group By函数会按照分组后的查询结果进行聚合计算,且每个分组只输出一条数据。但与传统的Group By函数不同,窗口函数(也称OLAP函数)可以为每个分组返回多个值,且不会影响记录的数量。本文介绍如何使用窗口函数。
19 0
C#基础——字符串、数字之间的转换
C#基础——字符串、数字之间的转换
99 0
1633
文章
0
问答
来源圈子
更多
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载