Returns a char represented by an int ASCII code.
SELECT CHAR(116) -- Returns 't'
SELECT CHAR(84) -- Returns 'T'
This can be used to introduce new line/line feed CHAR(10)
, carriage returns CHAR(13)
, etc. See AsciiTable.com for reference.
If the argument value is not between 0 and 255, the CHAR function returns NULL
.
The return data type of the CHAR
function is char(1)