Return the Unicode value as an integer for the first character of the input expression.
SELECT UNICODE(‘Atlanta’); |
The UNICODE() function returns the Unicode code point (integer value) for the first character of the input expression.
UNICODE(character_expression) |
Parameter |
Description |
character_expression |
Required. A string expression that can be either nchar or varchar. |
Works in: |
Available in SQL Server from 2008 onward, as well as in Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse. |
Retrieve the Unicode code point (integer value) for the first character of the input expression.
SELECT UNICODE(CustomerName) AS UnicodeOfFirstChar FROM Customers; |