Beginner

250. CHR Function

Learn how to convert a numeric character code into a character.

📘 Lesson 250 of 728 ⏱ 8 min 🎯 Intermediate

The CHR function returns the character associated with a specified numeric code in database systems that support the function.

Converting numeric codes into characters can be useful for formatting and specialized text-processing tasks.

Generate a character from its numeric code.

SQL
SELECT
    CHR(65) AS CharacterValue;

CHR can be used for formatting, special-character generation, text processing, and data transformation.

  • CHR converts a numeric code into a character.
  • It is useful for special characters.
  • It is mainly used in specialized text processing.
  • Function names vary by database.
  • Unicode-specific alternatives may exist.
What does CHR do?

CHR converts a numeric character code into its corresponding character.

Where can CHR be useful?

CHR can be useful for generating special characters and performing specialized text transformations.

Have you finished this lesson?

Introduction to SQL – All Lessons