Common functions of MySQL (String functions)

Source: Internet
Author: User

ASCII (char) returns the ASCII code value of a character
Bit_length (str) returns the bit length of a string
CONCAT (S1,S2...,SN) to concatenate s1,s2...,sn into a string
Concat_ws (SEP,S1,S2...,SN) joins the S1,S2...,SN into a string and uses the Sep character interval
Insert (STR,X,Y,INSTR) starts the string str from the x position, and the Y-character substring is replaced with a string instr, returning the result
Find_in_set (str,list) parses 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 a 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 position of the substring substr the first occurrence in the string str
QUOTE (str) escapes single quotation marks in Str with a backslash
REPEAT (STR,SRCHSTR,RPLCSTR) Returns the result of a string str repeating x times
REVERSE (str) Returns the result of reversing the string str
Right (STR,X) returns the rightmost X character in a string str
RTRIM (str) returns a space at the trailing end of a string str
STRCMP (S1,S2) comparing strings S1 and S2
TRIM (str) removes all whitespace from string header and trailing
UCASE (str) or upper (str) returns the result of converting all characters in the string str to uppercase

Common functions of MySQL (String functions)

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.