In this article, we are going to cover UNICODE() function where you will see the Unicode for given specific character or for expression character.
It is the function that gets the integer value for the first character of the input expression, as defined by the Unicode standard.
UNICODE function accepts a single parameter that means if you will give simply a character or you can give expression as input then it will read the first character and will return UNICODE for the same.
It is a nchar or nvarchar expression.
UNICODE function will give you an integer value for the first character. It returns an integer value or the Unicode value, for the first character of the input expression.
It will return the integer value of the first character of the input expression.
SELECT UNICODE('MS Dhoni');
Using UNICODE function with table columns.
SELECT UNICODE(PlayerName) AS UnicodeOfFirstChar, PlayerName FROM Player_Details;
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.