MySQL stored Procedure Basic functions

Source: Internet
Author: User
Tags rtrim strcmp

  1. String Class

    CHARSET (str)//return string character set
    CONCAT (string2 [,...])//connection string
    INSTR (string, substring)//returns the position where substring first appeared in string, no return 0
    LCASE (string2)// Convert to lowercase
    Left (string2, length)//The length of the string from string2
    Length (string)//string
    load_file (file_name)//read content from File
    LOCATE (substring, string [, Start_position]) same as InStr, but can specify start position
    Lpad (string2, length, pad)//repeat pad to start with string until string length
    LTRIM (string2)//Remove front-end spaces
    REPEAT (string2, count)//Repeat Count times
    replace (str, SEARCH_STR, REPLACE_STR)//replaces SEARCH_STR with REPLACE_STR in str
    Rpad (string2, length, pad)//after STR with pad supplement until length
    RTRIM (string2)//Remove back-end spaces
    STRCMP (string1, string2)//character comparison two string size,
    SUBSTRING (str, position [, length])//starting with the position of STR, taking a length character,
    Note: When working with strings in MySQL, the default first character subscript is 1, that is, the parameter position must be greater than or equal to 1
    TRIM ([[[Both| Leading| TRAILING] [padding] from]string2)//remove specified characters from the specified position
    UCASE (string2)//Convert to uppercase
    Right (string2,length)//Take string2 last length character
    space (count)//Generate count of spaces

  2. Number Class

    CHARSET (str)//return string character set
    CONCAT (string2 [,...])//connection string
    INSTR (string, substring)//returns the position where substring first appeared in string, no return 0
    LCASE (string2)// Convert to lowercase
    Left (string2, length)//The length of the string from string2
    Length (string)//string
    load_file (file_name)//read content from File
    LOCATE (substring, string [, Start_position]) same as InStr, but can specify start position
    Lpad (string2, length, pad)//repeat pad to start with string until string length
    LTRIM (string2)//Remove front-end spaces
    REPEAT (string2, count)//Repeat Count times
    replace (str, SEARCH_STR, REPLACE_STR)//replaces SEARCH_STR with REPLACE_STR in str
    Rpad (string2, length, pad)//after STR with pad supplement until length
    RTRIM (string2)//Remove back-end spaces
    STRCMP (string1, string2)//character comparison two string size,
    SUBSTRING (str, position [, length])//starting with the position of STR, taking a length character,
    Note: When working with strings in MySQL, the default first character subscript is 1, that is, the parameter position must be greater than or equal to 1
    TRIM ([[[Both| Leading| TRAILING] [padding] from]string2)//remove specified characters from the specified position
    UCASE (string2)//Convert to uppercase
    Right (string2,length)//Take string2 last length character
    space (count)//Generate count of spaces

  3. Date Time Class

    CHARSET (str)//return string character set
    CONCAT (string2 [,...])//connection string
    INSTR (string, substring)//returns the position where substring first appeared in string, no return 0
    LCASE (string2)// Convert to lowercase
    Left (string2, length)//The length of the string from string2
    Length (string)//string
    load_file (file_name)//read content from File
    LOCATE (substring, string [, Start_position]) same as InStr, but can specify start position
    Lpad (string2, length, pad)//repeat pad to start with string until string length
    LTRIM (string2)//Remove front-end spaces
    REPEAT (string2, count)//Repeat Count times
    replace (str, SEARCH_STR, REPLACE_STR)//replaces SEARCH_STR with REPLACE_STR in str
    Rpad (string2, length, pad)//after STR with pad supplement until length
    RTRIM (string2)//Remove back-end spaces
    STRCMP (string1, string2)//character comparison two string size,
    SUBSTRING (str, position [, length])//starting with the position of STR, taking a length character,
    Note: When working with strings in MySQL, the default first character subscript is 1, that is, the parameter position must be greater than or equal to 1
    TRIM ([[[Both| Leading| TRAILING] [padding] from]string2)//remove specified characters from the specified position
    UCASE (string2)//Convert to uppercase
    Right (string2,length)//Take string2 last length character
    space (count)//Generate count of spaces

MySQL stored Procedure Basic 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.