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

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

-- FIREBIRD
ascii_char(65)

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

(These are currently generated with jOOQ 3.15, see #10141)

Feedback

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

The jOOQ Logo