Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15

CHR

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

The CHR() or CHAR() function calculates the character representation of an ASCII code, or unicode in some dialects.

SELECT chr(64);
create.select(chr(65)).fetch();

The result being

+-----+
| chr |
+-----+
| A   |
+-----+

Dialect support

This example using jOOQ:

chr(65)

Translates to the following dialect specific expressions:

Access, BigQuery, CockroachDB, DuckDB, Exasol, H2, Informix, Oracle, Postgres, Redshift, Snowflake, Teradata, Vertica

chr(65)

ASE, DB2, HSQLDB, Hana, MariaDB, MemSQL, MySQL, SQLServer, SQLite, Sybase, YugabyteDB

char(65)

Firebird

ascii_char(65)

Aurora MySQL, Aurora Postgres, ClickHouse, Derby, SQLDataWarehouse, Trino

/* UNSUPPORTED */

(These are currently generated with jOOQ 3.20, see #10141), or translate your own on our website

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo