In mysql, the ASCII function converts characters into ascii code values. the following small series will introduce the usage and examples of ASCII functions in mysql to coders. For more information about coders, see. ASCII (str1)
Returns the ASCII
ASCII, GB2312, GBK, UTF-8 encoding:
Original address: HTTP://HI.BAIDU.COM/PHPEASE/ITEM/F450B5CAEC143014505058FC
variable naming rules:
1. Variable names are case-sensitive (case-sensitive).
2. Must begin with a letter or underscore. Variable
Instance
Returns the ASCII value of "H":
"; Echo ord (" Hello ")." ";? >
Definition and usage
The Ord () function returns the ASCII value of the first character in a string.
Grammar
Ord (String)
Parameter description
string is required. The string
Complete 8-bit ASCII two-dimensional table
ASCII and American Standard Code for information interchange read as "astkey", which defines the English letters or the same result and meaning represented by the 127 numbers ranging from 0 to one hundred
Chr () and ASCII () functions in Oracle (attached: characters commonly used and ASCII table)keywords: chr ()Chr () function action: Special handling of "special" charactersThe corresponding loadline and special characters can be queried in PlsqlChr (
One, ASCII (STR1)
Returns the ASCII code value of the leftmost character of the string str. If Str is an empty string, returns 0. If STR is NULL, return null
Example:1.
The code is as follows
Copy Code
Mysql> Select
The value range of the ASCII code is 0 ~ 127, which can be expressed in 7 bits. C LanguagecharThe variable size is defined as one byte. If the ASCII code is stored, only seven characters are used, and the value is 0. The following is an ascii code
Beginners love to develop small games, such as snakes and Tetris. To develop such games, they must be controlled by keys. Generally, we use the getch () function to receive keys directly, then convert it to the corresponding ASCII code, and compare
The so-called ASCII and 16 binary are just conceptual things that are all binary in the computerThe conversion should be the output of the conversion, the same number, in the computer memory is the same, but the output is not the sameASCII is the
ASCII: The United States Standard Information Interchange code, is now the most common single-byte encoding system. Here is a simple understanding of what the code means. Coding is the process by which information transforms from one form or format
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.