Friday, 22 April 2016

Use of ASCII and char function in SQL server ?

ASCII FUNCTION
ASCII (American Standard Code for Information Exchange) function is used to get the ASCII value of the given character expression

Syntax:
ASCII(CHARACTER EXPRESSION)

Example:
SELECT ASCII ('A')

Output:
65
CHAR FUNCTION
CHAR function is used to convert an ASCII value to a character

Syntax:
CHAR(INT)

Example:
SELECT CHAR (65)

Output:
A

No comments:

Post a Comment