MySQL CHAR() function
CHAR() function
MySQL CHAR() returns the character value of the given integer value according to the ASCII table. It ignores the NULL value.
Syntax:
CHAR (N…[USING characterset name])
Arguments:
Name | Description |
---|---|
N | Integers whose character values (according to the ASCII table) are to be retrieved. |
Syntax Diagram:
MySQL Version: 5.6
Video Presentation:
Example: MySQL CHAR() function
The following MySQL statement returns character values (according to the ASCII table) of the integers 67, 72, 65 and 82.
Code:
SELECT CHAR(67,72,65,82);
Sample Output:
mysql> SELECT CHAR(67,72,65,82); +-------------------+ | CHAR(67,72,65,82) | +-------------------+ | CHAR | +-------------------+ 1 row in set (0.02 sec)
All String Functions
Previous: BIT_LENGTH
Next: CHARACTER_LENGT
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework