UNICODE function returns the integer value as defined by the Unicode standard. It works for only first character of the input expression.
SyntaxUNICODE ( 'ncharacter_expression' )
Example 1:
DECLARE @nstring nchar(7)
SET @nstring = N'Jignesh'
SELECT UNICODE(@nstring) Result:
74
Example 2:
DECLARE @nstring nchar(1)
SET @nstring = N'§'
SELECT UNICODE(@nstring)Result:
167
