bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server UNICODE() Function

Concept visual

SQL Server UNICODE() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return an integer value (the Unicode value), for the first character of the input expression:

SELECT UNICODE('Atlanta');

Definition and Usage

The UNICODE() function returns an integer value (the Unicode value), for the first character of the input expression.

Syntax

Unicode(

character_expression )

Parameter Values

Parameter

Description character_expression Required. An nchar or varchar expression

Technical Details

Works in:

SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse

More Examples

Example

Return an integer value (the Unicode value), for the first character of the input expression:

SELECT UNICODE(CustomerName) AS UnicodeOfFirstChar

FROM Customers;

Previous

❮ SQL Server Functions

Next

Previous

SQL Server TRIM() Function

Next

SQL Server UPPER() Function