New versions: Dev (3.16) | Latest (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, EXASOL, H2, INFORMIX, ORACLE, POSTGRES, REDSHIFT, SNOWFLAKE, TERADATA, VERTICA
chr(65)

-- ASE, DB2, HANA, HSQLDB, MARIADB, MEMSQL, MYSQL, SQLITE, SQLSERVER, SYBASE, YUGABYTE
char(65)

-- FIREBIRD
ascii_char(65)

-- AURORA_MYSQL, AURORA_POSTGRES, DERBY, SQLDATAWAREHOUSE
/* UNSUPPORTED */

(These are currently generated with jOOQ 3.16, 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