char

Description

Returns the character equivalent of an integer.

Syntax

char(integer_expr)

Parameters

integer_expr

is any integer (tinyint, smallint, or int) column name, variable, or constant expression between 0 and 255.

Examples

Example 1

select char(42)
- 
* 

Example 2

select xxx = char(65)
xxx
--- 
A

Usage


Reformatting output with char

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute char.

See also

For general information about string functions, see “String functions”.

Functions ascii, str