MySQL functions Daquan

Source: Internet
Author: User
Tags mysql functions

Tag: Otherwise binary from char returns ROM MySQL function derivation cond

1. String functions

ASCII (STR)

Returns the ASCII value of the first character of the string str (str is empty when the string returns 0)

Ord (str)

If the string str first is a single byte, returns the same value as the ASCII () function.

Returns (first byte ASCII code) *256+ (second byte ASCII code) if it is a multibyte character [a character derived from the ANSI standard by each country][*256+third byte Asciicode ...]

Conv (n,from_base,to_base)

Converts the number n into a string return (NULL is returned if any argument is null, the binary range is 2-36, and n is the unsigned number if to_base is negative), and Conv works with 64-bit precision.

Bin (N)

Convert N to binary value and return with string (n is bigint number, equivalent to conv (n,10,2))

Oct (n)

Convert N to octal value and return with string (n is bigint number, equivalent to conv (n,10,8))

Hex (N)

Convert N to hex and return with string (n is bigint number, equivalent to conv (n,10,16))

CHAR (n,...)

Returns the parameter n,... A string of corresponding ASCII code characters (the parameter is n,... is a sequence of numbers, and null values are skipped)

Select char (77,121,83,81, ' i ') ' MySQL '

Concat (STR1,STR2,...)

The parameter is attached to a long string and returned (null if any argument is null).

Concat (' My ', ' s ', ' QL '), ' MySQL '

MySQL functions Daquan

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.