Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

CHAR

Example

Retrieve the character associated with the ASCII code 65.

SELECT CHAR(65AS CodeToCharacter;

Definition and Usage

The CHAR() function retrieves a character based on its corresponding ASCII code.

Syntax

CHAR(code)

Parameter Values

Parameter

Description

character

Mandatory. Specifies the ASCII number code for which the corresponding character is returned.

Technical Details

Works in:

SQL Server (from 2008 onward), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse