ASCII String Function In SQL Server 2008
In this article i will explain how to use the ASCII string function.
Introduction
ASCII (str) string function is used to return numeric value (ASCII code value) of left-most character of the given string str. It takes 1 argument as string/character expression.
- It will return 0 if str is empty.
- It will return NULL if str is NULL.
Syntax
ASCII (character_expression)
|
Example
Return ASCII value of a character.
To return the ASCII value for each character in the string "ASCII Function Example".