CHR

The CHR function takes an integer parameter representing the ASCII code and returns the corresponding character.

Syntax

CHR(int)

Argument

Argument

Description

int

Integer argument that represents the ASCII code of the character you want to retrieve

Returns

Returns the ASCII character representation of the supplied integer.

Example

Create the following table:

CREATE OR REPLACE TABLE t(x INT NOT NULL);

INSERT INTO t (x)
VALUES (72), (101), (108), (108), (111);

Execute the CHR function:

SELECT CHR(x) FROM t;

Output:

CHR   |
------+
H     |
e     |
l     |
l     |
o     |