字符串函数
更新时间 2025-06-17 10:58:14
最近更新时间: 2025-06-17 10:58:14
本文介绍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_LENGTH() | Return number of characters in argument |
CHAR() | Return the character for each integer passed |
CHARACTER_LENGTH() | Synonym for CHAR_LENGTH() |
CONCAT_WS() | Return concatenate with separator |
CONCAT() | Return concatenated string |
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 |
FIND_IN_SET() | Return the index position of the first argument within the second argument |
FORMAT() | Return a number formatted to specified number of decimal places |
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 specifified |
QUOTE() | Escape the argument for use in an SQL statement |
NOT REGEXP | Negation of REGEXP |
NOT LIKE | Negation of simple pattern matching |
LTRIM() | Remove leading spaces |
REPEAT() | Repeat a string the specifified number of times |
REPLACE() | Replace occurrences of a specifified string |
MAKE_SET() | Return a set of comma-separated strings that have the corresponding bit in bits set |
OCT() | Return a string containing octal representation of a number |
MID() | Return a substring starting from the specifified position |
ORD() | Return character code for leftmost character of the argument |
LOWER() | Return the argument in lowercase |
LENGTH() | Return the length of a string in bytes |
LOCATE() | Return the position of the fifirst occurrence of substring |
LPAD() | Return the string argument, left-padded with the specifified string |
REVERSE() | Reverse the characters in a string |
LIKE | Simple pattern matching |
OCTET_LENGTH() | Synonym for LENGTH() |
POSITION() | Synonym for LOCATE() |
RIGHT() | Return the specifified rightmost number of characters |
RPAD() | Append string the specifified number of times |
STRCMP() | Compare two strings |
UPPER() | Convert to uppercase |
TRIM() | Remove leading and trailing spaces |
RTRIM() | Remove trailing spaces |
UNHEX() | Return a string containing hex representation of a number |
SPACE() | Return a string of the specifified number of spaces |
SUBSTRING_INDEX() | Return a substring from a string before the specifified number of occurrences of the delimiter |
SUBSTR() | Return the substring as specifified |
SUBSTRING() | Return the substring as specifified |
UCASE() | Synonym for UPPER() |