MySQL string processing function collation

Source: Internet
Author: User

MySQL string function
ASCII value of ASCII (char) return character
Bit_length (str) returns the bit length of the string
CONCAT (S1,S2...,SN) connects S1,s2...,sn to a string
Concat_ws (SEP,S1,S2...,SN) connects the S1,S2...,SN to a string and uses the Sep character interval
INSERT (STR,X,Y,INSTR) begins string str from position x, and the substring of y characters is replaced with string InStr, which returns the result
Find_in_set (str,list) analyzes a comma-delimited list of lists and, if STR is found, returns the position of STR in the list
LCASE (str) or lower (str) Returns the result of changing all characters in the string str to lowercase
Left (str,x) returns the leftmost X character in the string str
LENGTH (s) returns the number of characters in the string str
LTRIM (str) cuts the opening space from the string str
POSITION (SUBSTR,STR) returns the substring substr the first occurrence in string str
QUOTE (str) escapes single quotes in Str with a backslash

REPEAT (STR,SRCHSTR,RPLCSTR) Returns the result of the string str repeats x times
REVERSE (str) Returns the result of the reversed string str
Right (STR,X) returns the rightmost X character in the string str
RTRIM (str) Returns the space of the string str tail
STRCMP (S1,S2) comparison string S1 and S2
TRIM (str) removes all whitespace from the header and tail of the string
UCASE (str) or upper (str) returns the result of converting all characters in the string str to uppercase

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.