Mega Code Archive

 
Categories / MSSQL Tutorial / String Functions
 

ASCII returns the ASCII numeric value of the leftmost character of a string

Only the first character in the string is evaluated. 40> DECLARE @ASCII_STRING CHAR(5) 41> SET @ASCII_STRING = "www.rntsoft.com rntsoft" 42> SELECT ASCII(@ASCII_STRING) 43> GO -----------         119 (1 rows affected)