SQL Server/T-SQL Tutorial/String Functions/UNICODE function
Returning Integer Unicode Values
<source lang="sql">
4> 5> SELECT UNICODE("G"), UNICODE("o"), UNICODE("o"), UNICODE("d"), UNICODE("!") 6> GO
----------- ----------- ----------- -----------
71 111 111 100 33
(1 rows affected)</source>
UNICODE Returns the integer Unicode value of a single leftmost character in a string
<source lang="sql">
4> SELECT UNICODE("sqle www.sqle.ru") 5> GO
106
(1 rows affected)</source>